I need help with an equation.

  • Thread starter Thread starter Jambruins
  • Start date Start date
J

Jambruins

I have 2 columns. One with either a W or an E in it and the secon
column has a number. I am trying to creat an equation where it wil
add all the numbers with a W to each other and likely wise with the
numbers. For example, I have
Column C D
Row 2 W 2
3 E 2
4 W 7
5 E 3
I would like a cell where it adds D2 and D4 together and another cel
that adds D3 and D5 together. Let me know if this doesn't make sens
and I will try explaining it again.

Thanks
 
SUMIF

=sumif(range,criteria,sum_range_if_different_to_range)

eg, with your Ws and Es in A1:A100 and your values in B1:B100, in any other
cell:-

=SUMIF(A1:A100,"W",B1:B100) for the Ws

or

=SUMIF(A1:A100,"E",B1:B100) for the Es

If you wanted to sum just values from the B Column that met some criteria, eg
were greater than 5, this would be handled as follows:-

=SUMIF(B1:B100,">5") Note you don't need the second range in this instance
 
sorry that post is impossible to read. I'll try again.

Column C has either a W or E in each cell. Column D has a number i
each cell. I want to add all the numbers together that correspond to
W cell. For example, cell C2 has a W and cell D2 has a 2. Cell C4 ha
a W and cell D4 has a 7. I want a formula that will add the 2+7.

I guess I need something like if C2=W then add D2, if C3=W then add D3
etc
 
Label Column E as "E"...in cell E2 enter =if
(c2=E,d2,0)...then label Column F as "W" and in cell f2
enter =if(c2=w,d2,0) ...then copy cells E2 and F2 all the
way down the column and auto sum at the bottom..
 
Column C has either a W or E in each cell. Column D has a number in
each cell. I want to add all the numbers together that correspond to a
W cell. For example, cell C2 has a W and cell D2 has a 2. Cell C4 has
a W and cell D4 has a 7. I want a formula that will add the 2+7.

=SUMPRODUCT(--(C2:C4="W"),D2:D4)
 
Back
Top