=SUMIF(F5:F500,"TR"+"AU",G5:G500)

data808

Active Member
Joined
Dec 3, 2010
Messages
353
Office Version
  1. 2019
Platform
  1. Windows
I have a drop down list in column F starting from cell F5 for the user to select from a few values. The user then will enter the number amount into column G starting from the G5 cell. Finally I have a totals cell that will sum up all the column G values if the user selects "MP" value from the drop down list in column F. Here is the formula for that:

=SUMIF(F5:F500,"MP",G5:G500)

It works fine. However now I want another totals cell to add up two types from the drop down list. Values "TR" and "AU" but I'm having issues with the formula. I have tried these with no luck:

=SUMIF(F5:F500,"TR"+"AU",G5:G500)
=SUMIF(F5:F500,"TR+AU",G5:G500)
=SUMIF(F5:F500,"TR" OR "AU",G5:G500)
=SUMIF(F5:F500,"TR"&"AU",G5:G500)

Please help. Thanks.
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Try one of these.
Excel Formula:
=SUMIF(F5:F500,"TR",G5:G500)+SUMIF(F5:F500,"AU",G5:G500)
Excel Formula:
=SUMPRODUCT(--ISNUMBER(MATCH(F5:F500,{"TR","AU"},0)),G5:G500)
 
Upvote 0
Solution
Try one of these.
Excel Formula:
=SUMIF(F5:F500,"TR",G5:G500)+SUMIF(F5:F500,"AU",G5:G500)
Excel Formula:
=SUMPRODUCT(--ISNUMBER(MATCH(F5:F500,{"TR","AU"},0)),G5:G500)
Worked like a charm. Thank you very much!
 
Upvote 0
You're welcome. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,214,792
Messages
6,121,612
Members
449,039
Latest member
Mbone Mathonsi

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