SUMIFS formula with texts and using OR

korhan

Board Regular
Joined
Nov 6, 2009
Messages
214
I am trying to use an "OR" statement or something similar to capture multiple scenarios in my SUMIFS formula.

=SUMIFS(sumrange,criteria_range_1,"2017"&" "&"*WITHHOLD *",criteria_range_2,criteria_2)

When the year is in the beginning, my formula has no problem and it captures but there some situations where the year is at the end so I am looking for "*WITHHOLD *" & "2017".
How can I incorporate this into my formula so sumifs captures either or.

Below is what I am thinking. How can I translate it into Excel's language?

=SUMIFS(sumrange,criteria_range_1,OR("2017"&" "&"*WITHHOLD *","*WITHHOLD *" & "2017"),,criteria_range_2,criteria_2)
 

Some videos you may like

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
55,935
Office Version
  1. 365
Platform
  1. Windows
The SUMIFS are structured to treat additional criteria as AND instead of OR.
If you want to do OR-type criteria, one way is to structure it like this:
Code:
=SUMIF(first criteria) + SUMIF(second criteria) - SUMIFS(both criteria)
 

Watch MrExcel Video

Forum statistics

Threads
1,122,670
Messages
5,597,482
Members
414,144
Latest member
UDFNewbie

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
Top