Formula to do a sumif when the if is to the right of each number?

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
2,572
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hi Everyone,
OK here goes,
I,ve got a list of 30 numbers in a row and to the right of each number is the category (A,B,C OR D)

now what I'm trying to do is add up all the numbers for each category as you see below,
if the data was in columns I'd use sumif, so I'm looking for a way to sumif when the values are next to the categories
to make it simple it starts at column A so it category in A2 value in B2 and continues along for 30 values.


a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
Total A
Total B
A
5
A
3
A
2
B
5
C
4
D2
A
5
B
5
15
10

<TBODY>
</TBODY>


<TBODY>
</TBODY>
so HOPEFULLY YOU CAN SEE FROM THIS I JUST WANT TOTALS FOR EACH category BUT ITS NOT SOMETHING I CAN GET?
any help would be great

Thanks

Tony

 

Some videos you may like

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.

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
2,572
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hi, wow,
yes that does it fine,

thanks very much

Amazing!
 

Watch MrExcel Video

Forum statistics

Threads
1,108,969
Messages
5,525,960
Members
409,673
Latest member
Riseee

This Week's Hot Topics

Top