#1   Report Post  
Posted to microsoft.public.excel.misc
ernie
 
Posts: n/a
Default VLOOKUP

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
Tom Ogilvy
 
Posts: n/a
Default VLOOKUP

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

--
Regards,
Tom Ogilvy

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



  #3   Report Post  
Posted to microsoft.public.excel.misc
MarkN
 
Posts: n/a
Default VLOOKUP

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,
MarkN


"ernie" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.misc
ernie
 
Posts: n/a
Default VLOOKUP

thank you
--
help a friend help you


"MarkN" wrote:

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,
MarkN


"ernie" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using single cell reference as table array argument in Vlookup CornNiblet Excel Worksheet Functions 3 September 22nd 05 09:15 AM
VLOOKUP Limitations chris_manning Excel Worksheet Functions 2 August 9th 05 06:23 PM
Have Vlookup return a Value of 0 instead of #N/A Mr Mike Excel Worksheet Functions 4 May 25th 05 04:51 PM
vlookup data hidden within worksheet Excel Worksheet Functions 0 January 26th 05 12:09 PM
Vlookup info being used without vlookup table attached? Excel Worksheet Functions 0 January 25th 05 10:43 AM


All times are GMT +1. The time now is 05:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"