How to sum cells values conditional to the content of other cell?

3d1l

New Member
Joined
Aug 26, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hello,

Can you please help me with this?

  1. There are random numerical values in the cells of column A:
  2. Cells in column B can contain one of two specific text string values "ABC" or "XYZ", that are randomly sorted as well.
  3. For any cell in column B where the text is equal to "ABC" sum the corresponding cells in column A
  4. Same goes for any cell in column B where the text is equal to "XYC"

Example:

A1 = 623 ... B1 = XYZ​
A2 = 305 ... B2 = ABC​
A3 = 274 ... B3 = ABC​
A4 = 839 ... B4 = XYZ​
B1 and B4 = XYZ C1 = A1+A4​
B2 and B3 = ABC C2 = A2+A3​
Thanks!
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Welcome to the MrExcel forum!

Try:

Book4
ABC
1623XYZ1462
2305ABC579
3274ABC
4839XYZ
Sheet12
Cell Formulas
RangeFormula
C1C1=SUMIFS(A:A,B:B,"XYZ")
C2C2=SUMIFS(A:A,B:B,"ABC")
 
Upvote 0
Solution
Eric, there is no doubt about it... you are definitively a MrExcel MVP.

Is working!!!

Thanks.
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,249
Members
449,075
Latest member
staticfluids

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