ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Sumif but taking a value (https://www.excelbanter.com/excel-worksheet-functions/246773-sumif-but-taking-value.html)

Mosqui

Sumif but taking a value
 
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.


Jacob Skaria

Sumif but taking a value
 
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
---------------
Jacob Skaria


"Mosqui" wrote:

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.


T. Valko

Sumif but taking a value
 
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!

--
Biff
Microsoft Excel MVP


"Mosqui" wrote in message
...
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.




Mosqui

Sumif but taking a value
 
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



"Jacob Skaria" wrote:

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
---------------
Jacob Skaria


"Mosqui" wrote:

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.


Mosqui

Sumif but taking a value
 
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. Valko" wrote:

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!

--
Biff
Microsoft Excel MVP


"Mosqui" wrote in message
...
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.



.


T. Valko

Sumif but taking a value
 
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)

--
Biff
Microsoft Excel MVP


"Mosqui" wrote in message
...
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. Valko" wrote:

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!

--
Biff
Microsoft Excel MVP


"Mosqui" wrote in message
...
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.



.





All times are GMT +1. The time now is 04:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com