indirect function

biglb79

Active Member
Joined
Oct 17, 2007
Messages
303
Office Version
  1. 2019
Platform
  1. Windows
how would I get this formula to work using the indirect function on cell S8? I want that cell to stay the same when I insert a new column


=+IF($S8<>0,(IF($S8=0,100%,$GA8/ABS($S8))),0)

Thanks
 
it's calculating a percentage change from the current month to the current month last year. the current month last year will always be in column P when I insert a new column by copying column D and inserting copied cells (I had the incorrect column labels up above but just went with it). However the column that calculates the current month to current month last year will move from FV to FW then to FX then FY, etc... so if I updated the correct columns below it looks like this. I need column P to always stay column P, but column FV to shift to the right when I insert a column. I hope that makes sense

=IF(INDIRECT("P8")<>0,(IF(INDIRECT("P8")=0,100%,INDIRECT("FV8")/ABS(INDIRECT("P8")))),0)
 
Upvote 0

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
but column FV to shift to the right when I insert a column.
Then don't use INDIRECT on this part, and it should automatically shift when you insert your column, i.e.
Code:
[COLOR=#333333]=IF(INDIRECT("P8")<>0,(IF(INDIRECT("P8")=0,100%,FV8/ABS(INDIRECT("P8")))),0)[/COLOR]
 
Upvote 0
that's what I thought but then everything calculates as 0.00% when I do that
 
Upvote 0
Then don't use INDIRECT on this part, and it should automatically shift when you insert your column, i.e.
Code:
[COLOR=#333333]=IF(INDIRECT("P8")<>0,(IF(INDIRECT("P8")=0,100%,FV8/ABS(INDIRECT("P8")))),0)[/COLOR]

perhaps it was something wrong with our linking here because now it's calculating a percentage
 
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,206
Members
453,022
Latest member
RobertV1609

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top