Help with Match

Eggplant2016

New Member
Joined
Jan 20, 2019
Messages
14
Here's what I have:
Column A is populated with numbers.
Column be has a unit of measurement (sp, cp, gp or pp)

I want E20 to keep a running total of all of the numbers that are "sp"
E21 to total all the cp, E22 to total the gp etc...

Column B's units of measurement will change. So for example B21 might be cp one day and sp the next. But I still need E20 to recognize all the values of sp and total them. E21 etc doing the same.

Please help!
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
A sum please. Something like this.
Column F is fixed. Columns A, B, And E are variable.

Column A Column B Column E F
5 cp 5 cp
10 sp 25 sp
15 sp 20 gp
20 gp
 
Last edited:
Upvote 0
20f03650f5.png


Code:
=SUMIF($B$2:$B$1000,D20,$A$2:$A$1000)

can use "SP" instead of D20

increase the 1000 to whatever or even better use a table and reference column name
 
Last edited:
Upvote 0
For E20:=SUMIFS(A:A,B:B,"sp")
For E21:=SUMIFS(A:A,B:B,"cp")
For E22:=SUMIFS(A:A,B:B,"gp")
For E23:=SUMIFS(A:A,B:B,"pp")
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,183
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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