Friday 6 July 2018

microsoft excel - Sum contents in column from starting cell on down without setting an explicit last cell index


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

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...