Variable cell reference in formula

BiggusDoggus

Board Regular
Joined
Jul 7, 2014
Messages
91
Office Version
  1. 365
Platform
  1. Windows
Hi all

I have this formula:

{=IF(AQ11="","",IFERROR(SUM(INDEX($B11:$T11,MATCH(FALSE,ISBLANK($B11:$T11),0)+2):T11),""))}

What I'm wanting is the "T" in the ranges be a cell value. Specifically, AV11.

To clarify - cell AV11 will have a letter (based on another formula, not relevant to this question). In essence, when the new month starts AV11 will display "U". So I want the T's be replaced by U's automatically.

Can this be done please?
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
something with INDIRECT maybe?

replace $T11 with INDIRECT(AV11&11)

Excellent - thank you!

Just a minor change - I couldn't have it as "&11" as when the cell formula is copied down it stays @ 11, instead of 12,13,14, etc etc. So I just added another column, AW, with 11,12,13,14 etc.

So:

{=IF(AQ11="","",IFERROR(SUM(INDEX($B11:(INDIRECT(AV11&AW11)),MATCH(FALSE,ISBLANK($B11:(INDIRECT(AV11&AW11))),0)+2):(INDIRECT(AV11&AW11))),""))}

Copied down ad nauseam..


Thanks for that!
 
Last edited:
Upvote 0
what row is your formula going into?

you can use ROW() to give you the the row number that the formula is currently in, so for example if you put =ROW() in any cell in row 11 the formula will return 11

in your formula it would be something like INDIRECT(AV11&ROW()) and then you wouldnt need the reference column AW
 
Upvote 0
what row is your formula going into?

you can use ROW() to give you the the row number that the formula is currently in, so for example if you put =ROW() in any cell in row 11 the formula will return 11

in your formula it would be something like INDIRECT(AV11&ROW()) and then you wouldnt need the reference column AW

You learn something new every day - I will do that. Thanks!
 
Upvote 0

Forum statistics

Threads
1,224,802
Messages
6,181,054
Members
453,014
Latest member
Chris258

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