Formula needed.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

A B
1 car 90
2 boat 20
3 airp 22
4 car 10
5 boat 25

I'm needing a formula that will add numbers in B related to the item in A .
Let's say a result for car = 100 ( 90+10) at the bottom on B6.
These are just 5 rows but I have around 150, however if you kindly provide me
with a formula for those 5, I can adjust it. THANKS in advance.
 
Using your example:

This formula returns the values associated with "Car":
B6: =SUMIF($A$1:$A$5,"Car",$B$1:$B$5)

Or...for more flexibility:
A6: Car
B6: =SUMIF($A$1:$A$5,A6,$B$1:$B$5)

Change range references to suit your situation.

Is that something you can work with?
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)
 
Here's one:

=100*SUMIF(A1:A5,"car",B1:B5)

You could put "car" into another cell, eg A6, then the formula could
become:

=100*SUMIF(A$1:A$5,A6,B$1:B$5)

I've made the row references absolute, so that you could put, say,
"boat" in A7 and copy the formula into B7 etc.

Hope this helps.

Pete
 
Thanks Ron, keep the good work.

Ron Coderre said:
Using your example:

This formula returns the values associated with "Car":
B6: =SUMIF($A$1:$A$5,"Car",$B$1:$B$5)

Or...for more flexibility:
A6: Car
B6: =SUMIF($A$1:$A$5,A6,$B$1:$B$5)

Change range references to suit your situation.

Is that something you can work with?
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)
 
A B
1 car 90
2 boat 20
3 airp 22
4 car 10
5 boat 25

I'm needing a formula that will add numbers in B related to the item in A .
Let's say a result for car = 100 ( 90+10) at the bottom on B6.
These are just 5 rows but I have around 150, however if you kindly provide me
with a formula for those 5, I can adjust it. THANKS in advance.


In addition to the SUMIF formula others have recommended, you might consider
using a Pivot Table (see the Data menu).

Using your data, I get this as a result:

Item Sum of Items
airp 22
boat 45
car 100
Grand Total 167

but it can be formatted in a variety of ways.
--ron
 
THANKS A LOT.

Pete_UK said:
Here's one:

=100*SUMIF(A1:A5,"car",B1:B5)

You could put "car" into another cell, eg A6, then the formula could
become:

=100*SUMIF(A$1:A$5,A6,B$1:B$5)

I've made the row references absolute, so that you could put, say,
"boat" in A7 and copy the formula into B7 etc.

Hope this helps.

Pete
 
i have the same question, would you be able to send me the working example
also. Please, many thanks. to (e-mail address removed)
 

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

Back
Top