Excel Calculation Performance: IFS vs OR

jmwbowen

Board Regular
Joined
Jul 27, 2012
Messages
58
Hello,

I read that an OR function will evaluate ALL logical expressions before returning a result, which seems wasteful because you'd think that as soon as it evaluated a single TRUE expression, it should no longer need to evaluate the remaining expressions.

Does the IFS function also evaluate ALL expressions before coming to a decision, even if the 1st expression resulted in TRUE?

I have a formula (currently an OR function) that contains five logical expressions. Would it be more efficient to use an IFS statement than an OR statement?

OR(expression 1, expression 2, expression 3, expression 4, expression 5)

IFS(expression 1, TRUE, expression 2, TRUE, expression 3, TRUE, expression 4, TRUE, expression 5, TRUE, TRUE, FALSE)

I could order the IFS expressions in order so that the expression most likely to return a TRUE result is 1st, and so on.

Thanks,

Jason
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Not quite sure why you are comparing the OR function to the IFS function, rather than nested IF to IFS.
However IFS will evaluate absolutely everything before coming to a decision.
 
Upvote 0

Forum statistics

Threads
1,215,463
Messages
6,124,963
Members
449,200
Latest member
indiansth

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