close

lets say i have a range name ADDUP. it starts from A1 to B5.
example:

colA | colB

Row1 1 | $200
Row2 1 | $150
Row3 2 | $600
Row4 2 | $150
Row5 1 | $800

if i want to use VLOOKUP function to add up all the values in columnB which
have 1 in columnA. and i want to do the same for values in colomnB which have
2 in columnA. Is it possible? and How do i go about doing it? I think i know
how to use VLOOKUP but im not sure how to let it add up the values.
=VLOOKUP(G1,ADDUP,2,FALSE). if i use this formula, it picks up the first
value and displays it in the cell. but does not add up the values for all the
1s and 2s.

Let me know if its possible.
Thanks in Advance.
--
help a friend help you

=Sumif($A$1:$A$5,1,$B$1:$B$5)

--
Regards,
Tom Ogilvy

quot;erniequot; gt; wrote in message
...
gt; lets say i have a range name ADDUP. it starts from A1 to B5.
gt; example:
gt;
gt; colA | colB
gt;
gt; Row1 1 | $200
gt; Row2 1 | $150
gt; Row3 2 | $600
gt; Row4 2 | $150
gt; Row5 1 | $800
gt;
gt; if i want to use VLOOKUP function to add up all the values in columnB
which
gt; have 1 in columnA. and i want to do the same for values in colomnB which
have
gt; 2 in columnA. Is it possible? and How do i go about doing it? I think i
know
gt; how to use VLOOKUP but im not sure how to let it add up the values.
gt; =VLOOKUP(G1,ADDUP,2,FALSE). if i use this formula, it picks up the first
gt; value and displays it in the cell. but does not add up the values for all
the
gt; 1s and 2s.
gt;
gt; Let me know if its possible.
gt; Thanks in Advance.
gt; --
gt; help a friend help you
You should be able to do this with a SUMIF function,something like
=SUMIF(A1:A5, 1, B1:B5) and =SUMIF(A1:A5, 2, B1:B5) to total the values in
column B where the value in column A is 1 or 2 respectively.
--
Hope this helps,
MarkNquot;erniequot; wrote:

gt; lets say i have a range name ADDUP. it starts from A1 to B5.
gt; example:
gt;
gt; colA | colB
gt;
gt; Row1 1 | $200
gt; Row2 1 | $150
gt; Row3 2 | $600
gt; Row4 2 | $150
gt; Row5 1 | $800
gt;
gt; if i want to use VLOOKUP function to add up all the values in columnB which
gt; have 1 in columnA. and i want to do the same for values in colomnB which have
gt; 2 in columnA. Is it possible? and How do i go about doing it? I think i know
gt; how to use VLOOKUP but im not sure how to let it add up the values.
gt; =VLOOKUP(G1,ADDUP,2,FALSE). if i use this formula, it picks up the first
gt; value and displays it in the cell. but does not add up the values for all the
gt; 1s and 2s.
gt;
gt; Let me know if its possible.
gt; Thanks in Advance.
gt; --
gt; help a friend help you

thank you
--
help a friend help youquot;MarkNquot; wrote:

gt; You should be able to do this with a SUMIF function,something like
gt; =SUMIF(A1:A5, 1, B1:B5) and =SUMIF(A1:A5, 2, B1:B5) to total the values in
gt; column B where the value in column A is 1 or 2 respectively.
gt; --
gt; Hope this helps,
gt; MarkN
gt;
gt;
gt; quot;erniequot; wrote:
gt;
gt; gt; lets say i have a range name ADDUP. it starts from A1 to B5.
gt; gt; example:
gt; gt;
gt; gt; colA | colB
gt; gt;
gt; gt; Row1 1 | $200
gt; gt; Row2 1 | $150
gt; gt; Row3 2 | $600
gt; gt; Row4 2 | $150
gt; gt; Row5 1 | $800
gt; gt;
gt; gt; if i want to use VLOOKUP function to add up all the values in columnB which
gt; gt; have 1 in columnA. and i want to do the same for values in colomnB which have
gt; gt; 2 in columnA. Is it possible? and How do i go about doing it? I think i know
gt; gt; how to use VLOOKUP but im not sure how to let it add up the values.
gt; gt; =VLOOKUP(G1,ADDUP,2,FALSE). if i use this formula, it picks up the first
gt; gt; value and displays it in the cell. but does not add up the values for all the
gt; gt; 1s and 2s.
gt; gt;
gt; gt; Let me know if its possible.
gt; gt; Thanks in Advance.
gt; gt; --
gt; gt; help a friend help you

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()