We help IT Professionals succeed at work.

Excel - Lock a range in an array formula

billb1057 asked
I'm not sure how to explain this, but the attached file shows an array formula that finds the first text cell in a column and returns the row number.
The problem I'm trying to solve is to lock the range as the entire column, so if any rows are deleted the range doesn't automatically get smaller.
Usually, I would set the range as the column like sum(a:a) and that sums everything in column a.  If you delete a row, it still gets the whole column.
With this array formula though, it doesn't like the use of that range.
Even if you set the range manually for a1:a65536 it doesn't seem to work.
If the range is set from a2:65536 or a1:65535, then the formula works.
But in those cases, if you delete a row, the range shrinks by one.

Any ideas on how to solve this?  Thanks.
Watch Question

Most Valuable Expert 2013
Hello billb1057,
Yes, you can't use a whole column in an array formula like that (not in Excel 2003 or earlier, anyway, you can in Excel 2007).
You could "fix" the range using INDIRECT, i.e.
or you could use MATCH like this
confirmed with CTRL+SHIFT+ENTER
regards, barry


Barry - thanks.  Both of those worked.  Would you know which one might calculate faster (if either does)?  
Most Valuable Expert 2013

I imagine that the MATCH version will be quicker......
regards, barry


That is great - thanks again.
Bill B