#1   Report Post  
marlea
 
Posts: n/a
Default Lookup Function help


I'm trying to use the Lookup function to return two values in a row.
E.g.:

worksheet1
column A=lookup values (in this example, the lookup value is "3"--which
is listed twice in the column)

columns B & C=data to be returned

worksheet 2
when the lookup value "3" is found, cells A1 and B1 should contain the
values from Sheet1 cells B1 and C1

when the lookup value "3" is found, cells A2 and B2 should contain the
values from Sheet1 cells B2 and C2

The formula I have is =VLOOKUP(3,Sheet1!A1:C6,{2,3}). In sheet2, I
selected cells A1 and B1 and array entered this formula in the formula
bar.

Result: Excel returns the correct values in A1 and B1, but doesn't find
the other instances of the look up value. When I select a cell and drag
the formula down, it only copies the values, it doesn't do a look up.
Why is Excel only finding one instance of the lookup value? Thanks.


--
marlea
------------------------------------------------------------------------
marlea's Profile: http://www.excelforum.com/member.php...o&userid=26209
View this thread: http://www.excelforum.com/showthread...hreadid=398243

  #2   Report Post  
Jim Rech
 
Posts: n/a
Default

A VLOOKUP returns the first match in the referenced range. I'm not clear
what you're expecting but a series of VLOOKUPs do not build on each other to
return other matches. Each just returns the first match in its range.

--
Jim
"marlea" wrote in
message ...
|
| I'm trying to use the Lookup function to return two values in a row.
| E.g.:
|
| worksheet1
| column A=lookup values (in this example, the lookup value is "3"--which
| is listed twice in the column)
|
| columns B & C=data to be returned
|
| worksheet 2
| when the lookup value "3" is found, cells A1 and B1 should contain the
| values from Sheet1 cells B1 and C1
|
| when the lookup value "3" is found, cells A2 and B2 should contain the
| values from Sheet1 cells B2 and C2
|
| The formula I have is =VLOOKUP(3,Sheet1!A1:C6,{2,3}). In sheet2, I
| selected cells A1 and B1 and array entered this formula in the formula
| bar.
|
| Result: Excel returns the correct values in A1 and B1, but doesn't find
| the other instances of the look up value. When I select a cell and drag
| the formula down, it only copies the values, it doesn't do a look up.
| Why is Excel only finding one instance of the lookup value? Thanks.
|
|
| --
| marlea
| ------------------------------------------------------------------------
| marlea's Profile:
http://www.excelforum.com/member.php...o&userid=26209
| View this thread: http://www.excelforum.com/showthread...hreadid=398243
|


  #3   Report Post  
Alan Beban
 
Posts: n/a
Default

marlea wrote:
I'm trying to use the Lookup function to return two values in a row.
E.g.:

worksheet1
column A=lookup values (in this example, the lookup value is "3"--which
is listed twice in the column)

columns B & C=data to be returned

worksheet 2
when the lookup value "3" is found, cells A1 and B1 should contain the
values from Sheet1 cells B1 and C1

when the lookup value "3" is found, cells A2 and B2 should contain the
values from Sheet1 cells B2 and C2

The formula I have is =VLOOKUP(3,Sheet1!A1:C6,{2,3}). In sheet2, I
selected cells A1 and B1 and array entered this formula in the formula
bar.

Result: Excel returns the correct values in A1 and B1, but doesn't find
the other instances of the look up value. When I select a cell and drag
the formula down, it only copies the values, it doesn't do a look up.
Why is Excel only finding one instance of the lookup value? Thanks.


If the functions in the freely downloadable file at
http://home.pacbell.net/beban are available to your workbook, you can
array enter into a 2-column range that has sufficient rows to
accommodate all the occurrences of the lookup value

=Vlookups(3,Sheet1!A1:C6,{2,3})

Alan Beban
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
Lookup Function Problems FFW Excel Worksheet Functions 2 August 21st 05 04:22 PM
Complicated lookup function chrisrowe_cr Excel Worksheet Functions 4 July 19th 05 05:52 PM
lookup function 1 Colboyfx Excel Worksheet Functions 4 July 15th 05 09:15 AM
How do I use 3 cells to create the string for a lookup function? Bencomo Excel Worksheet Functions 1 May 15th 05 07:17 AM
Lookup function Jeanke Excel Worksheet Functions 4 April 28th 05 01:06 PM


All times are GMT +1. The time now is 01:15 PM.

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

About Us

"It's about Microsoft Excel"