Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create macro for formulas
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 _________________ ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Create a macro to create excel line graph with coloured pointers anddata lables | Charts and Charting in Excel | |||
How do I create formulas between worksheets? | Excel Discussion (Misc queries) | |||
CREATE AND IF FORMULAS | Excel Worksheet Functions | |||
create if formulas | Excel Worksheet Functions | |||
How can formulas be used to create another formula? | Excel Discussion (Misc queries) |