Sum calculation but exclude specific column name

thedeadzeds

Active Member
Joined
Aug 16, 2011
Messages
442
Office Version
  1. 365
Platform
  1. Windows
Hi Guys,

Is it possible to sum rows but exclude a column based on the name.

For example, sum everything in the below but exclude the 'Total Column'

The total column could be anywhere in the header row so will not always be in the same column

So the example below excludes 4785 from the sum

Thanks

Column 1Column 2TotalColumn 3Column 4Column 5Column 6Sum
101564785414415447713
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Let's say that your data above is in the range A1:G2.
Then you could use this formula to get your desired SUM:
Excel Formula:
=SUM(A2:G2)-INDEX(A2:G2,MATCH("Total",A1:G1,0))
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0
Another option
Excel Formula:
=SUMIFS(A2:G2,A$1:G$1,"<>Total")
Hi Fluff, I've been trying to figure out how to adapt this for more than column header. So exclude "Total" and "Bonus". Can you please help? Thanks
 
Upvote 0
Try

Excel Formula:
=SUM(FILTER(A2:G2,(A1:G1<>"Total")*(A1:G1<>"Bonus"),0))
 
Upvote 0
Another option
Excel Formula:
=SUMIFS(A2:G2,A$1:G$1,"<>Total",A$1:G$1,"<>Bonus")
 
Upvote 0
Solution
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,264
Members
449,075
Latest member
staticfluids

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