Adding numbers in a range

G

gd

Hello,
I am wondering if there is an easy way to do this. If excel supports with a
method.

If I have a range. Maybe A1 to B20
Lets say column A has a word in it. And column B has numbers.
So maybe like this

aaa,4
aaa,7
bbb,9
bbb,3
bbb,4
ccc,4
ddd,5


Is there a way to add up all the bbb numbers? Using this range?

thanks
 
P

Pecoflyer

gd;221682 said:
Hello,
I am wondering if there is an easy way to do this. If excel support
with a
method.

If I have a range. Maybe A1 to B20
Lets say column A has a word in it. And column B has numbers.
So maybe like this

aaa,4
aaa,7
bbb,9
bbb,3
bbb,4
ccc,4
ddd,5


Is there a way to add up all the bbb numbers? Using this range?

thanks

Have a look at the SUMIF function.
Check XL's help for synta

--
Pecoflye

Cheers -
*'Membership is free' (http://www.thecodecage.com)* & allows fil
upload ->faster and better answers

*Adding your XL version* to your post helps finding solution faste
 
E

Eduardo

Hi,
Try
=SUMPRODUCT(--(A:A="bbb"),B:B)

I recommend to enter bbb or aaa in a cell and then refer to that cell in
your formula for example cell c1

=SUMPRODUCT(--(A:A=$c$1$),B:B)

If you are not using excel 2007 give a range to the parameters

=SUMPRODUCT(--(A1:A1000="bbb"),B1:B1000)

If this was helpful please say yes. thanks
 
L

Luke M

Indeed, there is. For more info, try XL's help file on SUMIF (or COUNTIF)

=SUMIF(A1:A20,"bbb",B1:B20)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top