Sum data, excluding a certain text string, both now and in future reports

mikeczyz

New Member
Joined
Aug 7, 2017
Messages
2
I'm writing a formula to sum up revenue data with an additional criteria or two.

There are pay types which I want to exclude. Let's say that I want to exclude any paytype which includes the word "Apple" in the label. That is, I might want to include "Check," "Cash" and "Credit," but exclude "Apple Pie." As it stands, I can write a formula which hardcodes exclusion of "Apple Pie" dollars, but I need to pass this spreadsheet off to someone. At some point in the future, maybe we'll have "Apple Soda" show up in the pay type column and the spreadsheet won't know to exclude it because it was never hard coded into the original formula.

Any ideas on how you might deal with this?

Thanks!

for extra credit: One feature I wouldn't mind implementing is a simple checkbox or something so client can see what is or isn't being summed and check on and off additional types. This is probably the safest, best way of doing this.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
If you're using a "Sumif": either set your criteria to exactly what you want or don't "<>" want.

Code:
=SUMIFS(FNDWRR!$13:$O$13191, FNDWRR!$F13:$F$13191, "Check", FNDWRR!$F13:$F$13191,"Cash", FNDWRR!$F13:$F$13191, "Credit")

=SUMIFS(FNDWRR!$13:$O$13191, FNDWRR!$F13:$F$13191, "<>Apple*")

Your extra credit can be done with a pivot table and even better with slicers.
 
Upvote 0
Right, I can write the specific formula for today's data set, but tomorrow's might be different. I need to look into slicers. Thank you!
 
Upvote 0

Forum statistics

Threads
1,216,100
Messages
6,128,824
Members
449,470
Latest member
Subhash Chand

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