Is it possible to avoid re-evaluations in subsequent formula parameter(s) if an evaluation has already been conducted in an earlier parameter?

Rnkhch

Well-known Member
Joined
Apr 28, 2018
Messages
528
Office Version
  1. 365
Platform
  1. Windows
Hello,

This is a general question which I recently started to think about as the size of several of my files are growing rapidly do to huge amounts of data generated by students.

For example, take this simple formula: IF(AVERAGE(A1:C1)>2,AVERAGE(A1:C1),1)

Here, the compiler evaluates AVERAGE(A1:C1) in the first parameter to see if the condition is TRUE or not, and then it re-evaluates the same expression in the second parameter to get the value if TRUE. Of course, in simple cases like this, this is ok, but when there are thousands of complex formulas, then avoiding these re-evaluations will make a big difference in terms of speeding up the file. (right now, in some of my files the delay has reached a couple of seconds every time I make a change.)

I was hoping if there is any way to recycle evaluations from those parameters that have already been checked by the compiler? :biggrin: Thanks for any input!
 
I'm not sure what you are saying, there is no 2nd part to the OP's question.
 
Upvote 0

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
"recycle evaluations from those parameters that have already been checked by the compiler" is not solved if you use the LET in multiple cells.
 
Upvote 0
That is not what the OP is talking about (IMO).
 
Upvote 0
Fluff is correct. I meant simply reusing parameter/code calculations within the same formula in the same cell while evaluating the cell, so that the parameter/code needs to only be evaluated once.

I've had an unbelievably pleasant experience with LET. As I was mentioning in my other thread a bit ago, one of my Excel applications which is very huge (249,820 cells with data and 229,620 formulas) used to take about 2-4 seconds to evaluate depending on how much data it contained. I redid all the formulas and used LET for portions that contained repeating occurrences of code. The result was unbelievable, and now my application evaluates in a split second like a small file 🍻
 
Upvote 0
I also went through and LETted my formulas. It surprised me that Excel would redo the same calculations in a formula. I guess I still don't understand why they didn't implement that. But I have work to do with regard to getting some of the computations to run across the workbook, outside of the LET. I'm wondering if you know of any way to design that?
 
Upvote 0
The variables in the LET function are only available to that particular formula & that cannot be changed.
 
Upvote 0
So would you put it in a helper cell if it's a computation that runs through the whole combination of cells, or is there an advanced technique?
 
Upvote 0
As I have absolutely no idea what you are trying to do, there is nothing I can do to help.
I would suggest that you start a thread of your own & clearly explain what you are doing.
 
Upvote 0
So would you put it in a helper cell if it's a computation that runs through the whole combination of cells
If I understand the question correctly, you can define names for code that needs to be utilized in multiple formulas in multiple cells. To do that, you can use the Name Manager. Then the code in that name gets evaluated per workbook evaluation. And the result of that one time of evaluation can be used in all other cells that refer to that name.

I have personally seen a lot of benefit in doing this as well.

But as Fluff mentioned, it's best to start a thread for your specific scenario.
 
Upvote 0
I wonder if what is in the name manager is calculating for each cell. Every time i put a calculation, it results in a "{...}" and I presume is re-performing the formula. Before I would make a new thread, I want to be sure about it.
 
Upvote 0

Forum statistics

Threads
1,216,192
Messages
6,129,432
Members
449,509
Latest member
ajbooisen

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