Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy number to pivot table
Hi,
I have a created a macro that uses 3 digit zip codes, copy and paste it to a pivot table and then copy and paste an estimated number for that specific zip code. Then the macro does the same process, goes to the next zip code, copy the zip code to the pivot table and then copy and paste the estimated number. The problem is that the zip code does not get copy and paste into the pivot table, it just takes whatever number is in there and estimate the number that I want for all zip codes. Here's my code. Is there something worng with it? The name of the worksheet where the zip code comes from is "RVA", the pivot table is located in the "Census Type", the estimated number is located in the "RVA" worksheet, and the name of the worksheet where the number is gotten from is "Summary" Sub Premium() startrow = Sheets("RVA").Range("D2") numrow = Sheets("RVA").Range("E2") i = startrow For i = startrow To numrow Sheets("RVA").Select Sheets("RVA").Rows(i + 3).Copy ActiveSheet.Paste Destination:=Worksheets("RVA").Rows(1) Sheets("Census Input").Select Range("Q4").Select ActiveSheet.PivotTables("PivotTable1").PivotCache. Refresh Application.Calculation = xlCalculationAutomatic D24e1 = Sheets("Summary").Range("H19") Sheets("RVA").Select Sheets("RVA").Cells(i + 3, 7) = D24e1 Next i End Sub Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
displaying name and number in a pivot table | Excel Discussion (Misc queries) | |||
Copy PIVOT table? | Excel Programming | |||
Pivot Table Field Number | Excel Discussion (Misc queries) | |||
Pivot Table Number Format | Excel Worksheet Functions | |||
Pivot table number format | Excel Programming |