I have an Excel spreadsheet and would like to sum the numbers in a column starting at one cell (say, B5
) and continuing down to the last number in that column.
I know I could just enter a large ending index, like:
SUM(B5:B99999)
But ideally I could just say something like:
SUM(B5:...)
And it would sum from B5 all the way down.
I saw this Superuser question - Excel: is it possible to sum an entire column without setting explicit cell boundaries? - which provides a solution for summing all of the numbers in a column via the following formula:
SUM(B:B)
Problem is, I don't want to sum all of the numbers, just those starting in B5 and down.
Thanks
Answer
For Excel 2003 or before:
=SUM(B5:INDEX(B5:B65536,MATCH(TRUE,INDEX(ISBLANK(B5:B65536),0,0),0)-1,0))
For Excel 2007 or after:
=SUM(B5:INDEX(B5:B1048576,MATCH(TRUE,INDEX(ISBLANK(B5:B1048576),0,0),0)-1,0))
No comments:
Post a Comment