Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
displaying name and number in a pivot table WVAE Excel Discussion (Misc queries) 0 September 10th 09 02:40 PM
Copy PIVOT table? MikeF[_2_] Excel Programming 5 March 30th 09 11:31 AM
Pivot Table Field Number confused al Excel Discussion (Misc queries) 1 August 27th 08 07:40 PM
Pivot Table Number Format Sarah Excel Worksheet Functions 1 June 14th 07 10:20 AM
Pivot table number format JIM.H.[_2_] Excel Programming 0 June 10th 04 08:23 PM


All times are GMT +1. The time now is 05:11 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"