There are different ways of determining the last populated cell in a column, depending on whether you are checking for numeric value or alpha-numeric values.
For example, if the column contains numeric values, you could use:
Formula:
=MATCH(9.9E+100,$A:$A,1)
If it is alpha-numeric, you could use:
Formula:
=MATCH(REPT("z",26),$A:$A,1)
And, if it's a mix:
Formula:
=MAX(MATCH(REPT("z",26),$A:$A,1),MATCH(9.9E+100,$A:$A,1))
So, to sum a range, you could use:
Formula:
=SUM($A$2:INDEX($A:$A,MAX(MATCH(REPT("z",26),$A:$A,1),MATCH(9.9E+100,$A:$A,1))))
So, if you create a Dynamic Named Range:
Formula:
=Sheet1!$A$2:INDEX(Sheet1!$A:$A,MAX(MATCH(REPT("z",26),Sheet1!$A:$A,1),MATCH(9.9E+100,Sheet1!$A:$A,1)))
... you could then say:
Formula:
=SUM(nrRange)
If you are using multiple ranges, always use the same column to determine the size of the named range.
And, all that said, those formula will not return the correct values if you have any of #N/A, #DIV/0!, #VALUE! Use IFERROR to return an acceptable value, for example, 0 or null.
Regards, TMS
Bookmarks