Cleanest Way to Use Sumif adding multiple critera?

MikeWeaver

New Member
Joined
Jul 23, 2014
Messages
26
I am looking for the cleanest way to sum everything in one column of a worksheet that meets the criteria for "Revenue" , or "Expense", my revenue column could actually have 10 or 12 line items so I am looking for the cleanest and shortest formula to do this. Thanks so much for any help you can give!

I have my table like this (simplified example):
ClassTotal
RevenueShoe SalesOther RevenueSock Sales
ExpensesBlahBlah Blah

<tbody>
</tbody>


and financials like this (simplified example):
Shoe Sales50
Other Revenue100
Operating Expense12
Sock Sales20
Blah10
Blah Blah10

<tbody>
</tbody>
 
Oh, Ok.

Then for Revenue it would be
=SUM(SUMIF(A1:A100,{"Sock Sales","Shoe Sales","Other Revenue"},B1:B100))

and for Expenses
=SUM(SUMIF(A1:A100,{"Expenses","Blah","Blah Blah"},B1:B100))

To use a Range for the criteria, say E2:G2
Try
=SUMPRODUCT(SUMIF(A1:A100,E2:G2,B1:B100))

That works perfectly. Thank you. I'm naming my first child Jonmo1.
 
Upvote 0

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Forum statistics

Threads
1,216,151
Messages
6,129,162
Members
449,489
Latest member
spvclub

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