ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Copy formula down a column does not use correct cell reference (https://www.excelbanter.com/excel-discussion-misc-queries/63888-copy-formula-down-column-does-not-use-correct-cell-reference.html)

brett

Copy formula down a column does not use correct cell reference
 
I have a sheet that displays a sum in a pivot table. I am then trying to
calculate that sum as a percentage in the next column. My problem is that I
have 300 rows to fill with the percentage formula. When I try to drag the
formula down the page, it does not use the corresponding row's cell from the
pivot table. How do I prevent that? For example:

=IF(ISERROR(GETPIVOTDATA("wTime",$X$3,"wk",12)/AI16),"-",GETPIVOTDATA("wTime",$X$3,"wk",12)/AI16)

Then as I drag the formula down it changes the AI16 to the correct cell
reference but the part that does not update correctly is the
"wTime",$X$3,"wk",12 where the 12 should become 13, then 14 and so on. It's a
long formula and I have 5 columns of over 300 rows that I don't want to have
to update manually. Any suggestions? Thanks in advance.

pinmaster

Copy formula down a column does not use correct cell reference
 
Try changing the "12' with ROW(12:12) or ROW(A12)

HTH
JG

"brett" wrote:

I have a sheet that displays a sum in a pivot table. I am then trying to
calculate that sum as a percentage in the next column. My problem is that I
have 300 rows to fill with the percentage formula. When I try to drag the
formula down the page, it does not use the corresponding row's cell from the
pivot table. How do I prevent that? For example:

=IF(ISERROR(GETPIVOTDATA("wTime",$X$3,"wk",12)/AI16),"-",GETPIVOTDATA("wTime",$X$3,"wk",12)/AI16)

Then as I drag the formula down it changes the AI16 to the correct cell
reference but the part that does not update correctly is the
"wTime",$X$3,"wk",12 where the 12 should become 13, then 14 and so on. It's a
long formula and I have 5 columns of over 300 rows that I don't want to have
to update manually. Any suggestions? Thanks in advance.



All times are GMT +1. The time now is 02:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com