Create macro for formulas

C

celia

Hi,

I have this formula in:

For (B8:F8)
1. Column B8 IF(ISERR(GETPIVOTDATA("Sum o
Normal",[Book5.xls]PT_PD1!$H$1,"JOB NO.",9907)),0,GETPIVOTDATA("Sum o
Normal",[Book5.xls]PT_PD1!$H$1,"JOB NO.",9907))

2. C8 IF(ISERR(GETPIVOTDATA("Sum of OT 1",[Book5.xls]PT_PD1!$H$1,"JO
NO.",9907)),0,GETPIVOTDATA("Sum of OT 1",[Book5.xls]PT_PD1!$H$1,"JO
NO.",9907))

3. D8 IF(ISERR(GETPIVOTDATA("Sum of OT 2",[Book5.xls]PT_PD1!$H$1,"JO
NO.",9907)),0,GETPIVOTDATA("Sum of OT 2",[Book5.xls]PT_PD1!$H$1,"JO
NO.",9907))


4. E8 IF(ISERR(GETPIVOTDATA("Sum of OT 3",[Book5.xls]PT_PD1!$H$1,"JO
NO.",9907)),0,GETPIVOTDATA("Sum of OT 3",[Book5.xls]PT_PD1!$H$1,"JO
NO.",9907))


5. F8 IF(ISERR(GETPIVOTDATA("Sum of OT 4",[Book5.xls]PT_PD1!$H$1,"JO
NO.",9907)),0,GETPIVOTDATA("Sum of OT 4",[Book5.xls]PT_PD1!$H$1,"JO
NO.",9907))

For (B9:F9)
the data field change from "Sum of Normal" to "Sum of OT1,2,3,4" an
pivot table "PT_PD1" to "PT_PD2"

And I need to use the formulas for 50 rows.
At the moment I have to manually change and insert the formula but i
might a problem in the future when I need to GetpivotData for mor
items.

Is there anyway of creating macro to include the formul
(GETPIVOTDATA)?

Any advice will be much apppreciate?

Thanks


_________________
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top