Sumif but taking a value

M

Mosqui

Must be pretty simple but not sure how to do it.
I have a sumif function doing a summary of quantities, but I also need to
get the unit used in these quantities.
abc 5 m
ert 3 l
dfg 9 m2
abc 7 m
dfg 6 m2

With sumif in my summary I now I have 12 abc, but I need the unit in a
column too.
 
J

Jacob Skaria

Do you mean SUMIF with multiple criterias

--When you have multiple criteria use SUMPRODUCT()
=SUMPRODUCT((A1:A10=criteria1)*(B1:B10=criteria2),C1:C10)

If you are using Excel 2007 you can use SUMIFS() to acheive the same result
=SUMIFS(C1:C10,A1:A10,criteria1,B1:B10,criteria2)

'or with cells F1 and F2 holding the criteria
=SUMIFS(C1:C10,A1:A10,F1,B1:B10,F2)

If this post helps click Yes
 
T

T. Valko

Need more info.

I'm assuming the unit is the right column?

So, the unit for abc is m. So, what do you want to do with m? What if there
are more than one units for abc?

Need details!
 
M

Mosqui

No, sorry I may have explained wrong.
I haven't got two criterias, I only want to pick up a value. I want to use
something similar to sumif but only getting the value, not adding it.
When column A is the same as column C put the value I have in B in column F
 
M

Mosqui

abc is always in m. The relation between the first column and the unit is
always the same. Has to be simple. Is like an IF but as abc is repeated a few
times I need something more powerful.

thanks
 
T

T. Valko

Still not clear what you want. See if this is what you want...

=VLOOKUP("abc",A$1:C$5,3,0)

Or, using a cell to hold the criteria...

E1 = abc

=VLOOKUP(E1,A$1:C$5,3,0)
 

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