Trying to rid my file of slow INDIRECT functions, but stuck

d0rian

Active Member
Joined
May 30, 2015
Messages
313
Office Version
  1. 365
I've recently been reading how much frequent use of volatile functions (esp INDIRECT) slows down calculation speed, which might be the source of my file's bad lag, since I use it a lot.

I've managed to eradicate it from most of my formulas, but I'm stick with a dozen columns where I can't figure out how to get rid of it. Below is an example of one of the columns. Here's the problem:

- Column EJ needs to run a calculation on a set of rows that changes as I pull new values into the file. In this instance, it's counting things starting from row 4 down to the row above the cell with the formula (ROW()-1).
- Columns DW and DX are helper cells that specify the first and last row of the range...so in this case, the INDIRECT function will return "EI4:EI15"
- The data in the rest of my file updates frequently, and therefore DW and DX update with different row-ranges as well...which is why I'm using INDIRECT in the first place...because I need the formula in EJ to be dynamic / able to adapt to a changing range.

I haven't included the full formula below because it's very long, and moreover I have a dozen other columns that use different formulas with slightly different iterations of the INDIRECT function...so I didn't want posters to look to provide a solution for this one particular use case, because I'm relying on this type of syntax in a dozen different places. So hoping that someone might just be able to tell me in general terms whether there's a better way to refer to a dynamic range than what I'm currently doing.

kdoa5Ui.jpg
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
I think you might be able to use INDEX for such dynamic calculations.

In place of your indirect function you could use

INDEX(EI:EI, DW16):INDEX(EI:EI, ROW()-1)

You may wish to have the column dynamic also, so that could be achieved by expanding the EI:EI range and calculating the column number relative to the start.
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,200
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