Do shorter formulas affect calculation speed performance?

Country_Calc

New Member
Joined
Feb 14, 2017
Messages
48
Office Version
  1. 365
I have a spreadsheet which has many +COUNTIFS, +SUMIFs in a series.

Example =COUNTIFS(A1:A100,"*Name*",B1:100,"*Title*")+COUNTIFS(A1:A100,"*Other*",B1:100,"*Other*")+COUNTIFS(A1:A100,"*Var1*",B1:100,"*Var2*")+


If I redo with something like this below, would this improve excel's ability to calculate it faster?

=SUM(COUNTIFS(A1:A100,"*Name*",B1:B100,{"*Title*","*Other*","*Var1*}))
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
I don't think it matters if one is faster than the other, because they don't both do the same thing.

Original
=COUNTIFS(A1:A100,"*Name*",B1:B100,"*Title*")+COUNTIFS(A1:A100,"*Other*",B1:B100,"*Other*")+COUNTIFS(A1:A100,"*Var1*",B1:B100,"*Var2*")
Your attempt with the SUM(COUNTIFS syntax is doing this
=COUNTIFS(A1:A100,"*Name*",B1:B100,"*Title*")+COUNTIFS(A1:A100,"*Name*",B1:B100,"*Other*")+COUNTIFS(A1:A100,"*Name*",B1:B100,"*Var1*")


Anyway, generally speaking I don't believe the sum(countifs syntax is any faster than coutifs+countifs.
At least not the calculation speed.
It's really just a short cut to make it easier to write. It still actually performs each of the multiple countifs.


And as a rule of thumb, Shorter does not = Better. Usually, maybe, but not absolutely.
Don't let the length of a formula be the sole purpose for trying to 'fix' it.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,284
Messages
6,124,059
Members
449,139
Latest member
sramesh1024

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