Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
I have a list of customers in Column B and I would like to copy the value in B2 to replace the end of a formula in Column c The formula in column c is =(GETPIVOTDATA("Sum of Qty",'Y:\Spares sales\[2008.xls]2008 Table'!$A$5,"Customer Name","SUNDRY EXPORT USD")) The last bit of the formula SUNDRY EXPORT USD needs to change to whatever is in Column B for the same row. It it possible? I tried to create a macro which looks like this Range("B2").Select ActiveCell.FormulaR1C1 = "SUNDRY HOME" Range("C2").Select ActiveCell.FormulaR1C1 = _ "=(GETPIVOTDATA(""Sum of Qty"",'[2008.xls]2008 Table'!R5C1,""Customer Name"",""SUNDRY HOME""))" Range("D2").Select But I dont know how to make it work for the rest of Column B. I am pulling the info from a pivot table and just wanted to save time by copying and pasting the same formula but need a macro to change the last bit in the formula ie The Customer name. Can anyone help? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Automatic GETPIVOTDATA formula generation from within VBA? | Excel Discussion (Misc queries) | |||
Average from the GETPIVOTDATA formula | Excel Discussion (Misc queries) | |||
Vlookup within GetPivotData formula | Excel Worksheet Functions | |||
Help a Newbie! Using GETPIVOTDATA formula! | Excel Discussion (Misc queries) | |||
GETPIVOTDATA FORMULA | Excel Worksheet Functions |