A1:A5000 Vs A:A

Russk68

Well-known Member
Joined
May 1, 2006
Messages
596
Office Version
  1. 365
Platform
  1. MacOS
I have always put a limit on column ranges in formulas thinking that it will be quicker to calculate. I have also ran into problems when I would expand data on a sheet where other sheets become inaccurate because I did not update the formula. So, does a formula like Index Match with A1:A5000 calculate faster vs A:A?
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
By & large, yes it will take longer, especially if you are using array formulae.
 
Upvote 0
Most functions (as opposed to operators like * or +) will only calculate based on the used range of the references, so I doubt you will see much difference generally. You could also use tables or dynamic named ranges.
 
Upvote 0
Solution
Most functions (as opposed to operators like * or +) will only calculate based on the used range of the references, so I doubt you will see much difference generally. You could also use tables or dynamic named ranges.
Thank you!
 
Upvote 0
Most functions (as opposed to operators like * or +) will only calculate based on the used range of the references, so I doubt you will see much difference generally. You could also use tables or dynamic named ranges.
I have on several occasions tried to get definitive documentation on this but the only documentation I have seen refers to the SumIf & CountIf group of functions being aware of the Used Range. I have not been able to confirm that it applies to the newer SumIfs CountIfs etc.
We are generally under the impression that most lookup functions are not in fact aware of the used range (and I believe that @Fluff is also of that opinion).

I am not sure of a definitive test either but the below would indicate perhaps even CountIf is not limiting itself to the used range.

XLookup EntireColumn Test 20241220.xlsx
ABCDEFGH
1
2
3Test Xlookup=ROW(XLOOKUP(1,--ISBLANK(E:E),E:E,,,-1))Dummy Values
4Last to First1048576E4
5First to Last1E5
6E6
7Test CountIf=COUNTIF(E:E,"<>1")E7
81048576E8
9E9
10E10
11E11
12
13
14Last Cell (End of Used Range)
15
Test Sheet
Cell Formulas
RangeFormula
C3,C7C3=FORMULATEXT(C4)
C4C4=ROW(XLOOKUP(1,--ISBLANK(E:E),E:E,,,-1))
C5C5=ROW(XLOOKUP(1,--ISBLANK(E:E),E:E,,,1))
C8C8=COUNTIF(E:E,"<>1")
 
Upvote 0
Thanks @RoryA, I am aware of Charles work but that post dates back to Dec 2015 (based on the comments since he doesn't seem to date the article). If some of the comments around the performance of arrays hold true for the dynamic array formulas then we are definitely going to need the not yet released TrimRange function.
His testing does seem to indicate that Match is Used Range aware although the only documentation on a Microsoft web site only mentions the SumIf, CountIf group of functions.

Anyway lets leave it there. I will keep an eye out for clarifying documentation ;)
 
Upvote 0
I know there were quite a few performance improvements made in 2016, as Charles mentions here, (including performance of full column refs) but I don't remember seeing a similar thing about later versions - not that that means a lot. :)
 
Upvote 0

Forum statistics

Threads
1,224,837
Messages
6,181,255
Members
453,028
Latest member
letswriteafairytale

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