Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 36
Default Vlookup help

I have two worksheets. Sheet 1 contains a number in column A and a name in
column C. On Sheet 2 I put my data from a csv file.

What I would like to do is vlookup Sheet 1 column C from the information on
Sheet 2 and return the number in column A that is associated with the name in
column C.
Ex.

Sheet 1 Sheet 2

A B C A B

33 N6-270-15 N6-270-75 35
34 N6-270-30 N6-270-15 33
35 N6-270-75 N6-270-15 33
36 N6-270-110 N6-270-30 34

  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 915
Default Vlookup help

Novice Lee wrote:
I have two worksheets. Sheet 1 contains a number in column A and a name in
column C. On Sheet 2 I put my data from a csv file.

What I would like to do is vlookup Sheet 1 column C from the information on
Sheet 2 and return the number in column A that is associated with the name in
column C.
Ex.

Sheet 1 Sheet 2

A B C A B

33 N6-270-15 N6-270-75 35
34 N6-270-30 N6-270-15 33
35 N6-270-75 N6-270-15 33
36 N6-270-110 N6-270-30 34


VLOOKUP cannot do this, because the result you want is left of the range
to match (VLOOKUP requires the result to be in the same column or to the
right of the range to match).

But this will work in Sheet2 B1:

=INDEX(Sheet1!$A$1:$A$4,MATCH($A1,Sheet1!$C$1:$C$4 ,0),1)

Fill down.
  #3   Report Post  
Posted to microsoft.public.excel.newusers
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Vlookup help

You can use an index/match ..
In Sheet2,
Assume data in A2 down
Put in B2:
=IF(ISNA(MATCH(A2,Sheet1!B:B,0)),"",INDEX(Sheet1!A :A,MATCH(A2,Sheet1!B:B,0)))
Copy down as far as required
voila?, hit the YES below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"Novice Lee" wrote:
I have two worksheets. Sheet 1 contains a number in column A and a name in
column C. On Sheet 2 I put my data from a csv file.

What I would like to do is vlookup Sheet 1 column C from the information on
Sheet 2 and return the number in column A that is associated with the name in
column C.
Ex.

Sheet 1 Sheet 2

A B C A B

33 N6-270-15 N6-270-75 35
34 N6-270-30 N6-270-15 33
35 N6-270-75 N6-270-15 33
36 N6-270-110 N6-270-30 34

  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 207
Default Vlookup help

Max,
Your formula needs a little treeking:
Novice Lee has put the information on Sheet 1 in Columns A & C (not B).
So"
=IF(ISNA(MATCH(A2,Sheet1!B:B,0)),"",INDEX(Sheet1!A :A,MATCH(A2,Sheet1!B:B,0)))"
Should be
"=IF(ISNA(MATCH(A2,Sheet1!C:C,0)),"",INDEX(Sheet1! A:A,MATCH(A2,Sheet1!C:C,0)))"
hth

"Max" wrote:

You can use an index/match ..
In Sheet2,
Assume data in A2 down
Put in B2:
=IF(ISNA(MATCH(A2,Sheet1!B:B,0)),"",INDEX(Sheet1!A :A,MATCH(A2,Sheet1!B:B,0)))
Copy down as far as required
voila?, hit the YES below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"Novice Lee" wrote:
I have two worksheets. Sheet 1 contains a number in column A and a name in
column C. On Sheet 2 I put my data from a csv file.

What I would like to do is vlookup Sheet 1 column C from the information on
Sheet 2 and return the number in column A that is associated with the name in
column C.
Ex.

Sheet 1 Sheet 2

A B C A B

33 N6-270-15 N6-270-75 35
34 N6-270-30 N6-270-15 33
35 N6-270-75 N6-270-15 33
36 N6-270-110 N6-270-30 34

  #5   Report Post  
Posted to microsoft.public.excel.newusers
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Vlookup help

Agreed, it should be:
=IF(ISNA(MATCH(A2,Sheet1!C:C,0)),"",
INDEX(Sheet1!A:A,MATCH(A2,Sheet1!C:C,0)))

Thanks for the correction
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
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
VLookUp - Does the VLookUp return the exact information? Cpviv Excel Worksheet Functions 2 October 28th 08 09:57 AM
Vlookup in vlookup - taking the result as array name SupperDuck Excel Worksheet Functions 2 June 2nd 07 11:05 AM
Combine VLOOKUP and IF function so #NA isn't returned as a value from VLOOKUP buffgirl71 Excel Discussion (Misc queries) 12 November 14th 06 11:36 PM
Vlookup -=VLOOKUP(F9,LookUp1!$A$2:$B$1504,2,FALSE) MikeR-Oz New Users to Excel 1 March 22nd 06 09:01 AM
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 03:58 PM.

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"