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>
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Hi, maybe I am mistaken, but wouldn't this formula sum everything with "revenue" or "expense" in the title? I am looking for a formula that would only sum the three classifiers for revenue in my table (which includes things like "sock sales" that don't have the word revenue in them). I am also looking to seperate revenue and expenses, not combine them. Thanks for your help, and sorry if I was unclear!
 
Upvote 0
I thought that was what you wanted?

Are you saying you want seperate formulas, 1 for revenue, another for expenses etc?

Then it's just
=SUMIF(A1:A100,"*Revenue*",B1:B100)

If you want to use a cell reference for Revenue, try
=SUMIF(A1:A100,"*"&D1&""*,B1:B100)
D1=Revenue
 
Upvote 0
Sorry, I don't think I am communicating this very well. Maybe it would help to just focus on the Revenue total. I am looking for it to sum "Shoe Sales", "Sock Sales" and "Other Revenue", these line items could be anything, so I don't want it to just look for search for terms with "sales" or "revenue" in the name. I believe your formula would only find "Other Revenue".

Thank you for your help and I apologize again for the lack of clarity in my request.
 
Upvote 0
Maybe something like this...



A

B

C

D

E

F

G

H

1

Class​

Total​

Class​

Value​

2

Revenue​

Shoe Sales​

Other Revenue​

Sock Sales​

170​

Shoe Sales​

50​

3

Expenses​

Blah​

Blah Blah​

20​

Other Revenue​

100​

4

Operating Expense​

12​

5

Sock Sales​

20​

6

Blah​

10​

7

Blah Blah​

10​

<TBODY>
</TBODY>


Formula in E2 copied down
=SUMPRODUCT(SUMIF($G$2:$G$100,B2:D2,$H$2:$H$100))

Hope this helps

M.
 
Upvote 0
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))
 
Upvote 0

Forum statistics

Threads
1,215,374
Messages
6,124,567
Members
449,171
Latest member
jominadeo

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