Formula needed.

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.
 
R

Ron Coderre

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)
 
P

Pete_UK

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
 
G

Guest

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)
 
R

Ron Rosenfeld

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
 
G

Guest

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
 
W

westy

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

Similar Threads

SUMPRODUCT 2
IF statement help please 4
Large / Small 5
sum until criteria not met 5
formula to display cell address 2
Help with Formula 2
getting value from a different cell...? 3
Reverse table array lookup? 6

Top