Sumif

jlkirk

Active Member
Joined
May 6, 2002
Messages
328
Office Version
  1. 365
In Column A, in each cell in rows 1-10, there is various text that may or may not include "ABC" and "DEFG" as the first four letters. In Column B, rows 1-10, there is numerical data. What I would like to do in Column C, rows 1-10, is place a formula that would return the contents of the respective cell in Column B, but only where the first three or four letters in the respective cell in column A is "ABC" or "DEFG". Any ideas?
Thanks in advance.
 
Thanks again. So it is not possible to short-cut the "OR" argument when it is embedded in a SUMPRODUCT function (?)
 
Upvote 0

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
I don't believe so in this case. If you were looking for exact matches, you could use an array constant, but you aren't.
 
Upvote 0
If you have a longer list of criteria to check you could use a formula like

=SUMPRODUCT((D1:D10=111)*ISNUMBER(FIND("^^"&{"ABC","DEFG"},"^^"&A1:A10))*B1:B10)

where "^^" is some text that won't appear in your data

......or if you are using Excel 2007 you could use SUMIFS function and revert to wildcards
 
Upvote 0

Forum statistics

Threads
1,216,213
Messages
6,129,552
Members
449,516
Latest member
lukaderanged

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