Exclude cells from a formula using a whole column

Walky

Board Regular
Joined
Apr 23, 2004
Messages
104
Hi,

I'm trying to have the total of a column displayed on the 2nd row (below the title of that column). Since I'll be regularly adding numbers (downwards) I decided to display the total at the top.

So I need to sum the column (as long as I enter a number is should be added without having to extend the formula's range), EXCLUDING rows 1 & 2.

How do I define that?

Thanks,

W.
 
Fairwinds, your new formula works only if I keep the hidden ZERO option I mentioned earlier for use with Onlyadrafter's formula.

This might sound quite newbie, but isn't there a way to define cells to exclude from this formula "sumc:c" so it sums the whole column excluding the cells used for titles and the one displaying the result?

W
 
Upvote 0

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
I don't understand what you mean. Can you post your sheet?

What is really the reason that you cannot use =SUM(A3:A65536)?
 
Upvote 0
I won't keep bugging you with this, since the simple formula works.
But I was intrigued (getting obsessed) by the "exclusion" option.

Thanks yall.

W.
 
Upvote 0
Well, I would not mind helping you further but I just cannot replicate your problem. Anyway, my advice is that you use the simplest possible sollution, that is normally the best. Just let the SUM formula point at the cells you want to sum.
 
Upvote 0
Walky said:
Fairwinds, your new formula works only if I keep the hidden ZERO option I mentioned earlier for use with Onlyadrafter's formula.

This might sound quite newbie, but isn't there a way to define cells to exclude from this formula "sumc:c" so it sums the whole column excluding the cells used for titles and the one displaying the result?

W

Fairwinds's proposal can be qualified to accomodate...
Book3
BCDE
144
2Vals
37
45
57
69
70
8
9
104
115
127
13
Sheet1


The formula in C1 is:

=SUM(INDEX(C:C,ROW()-ROW($C$1)+2):INDEX(C:C,MATCH(9.99999999999999E+307,C:C)))

Note that the formula ignores any text after row 1. Moreover, it doesn't check whether the relevant range contains any number, that is, it will give #N/A if the relevant range does not house at least one number, although a test can be added for such a test.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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