View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Tom Hutchins Tom Hutchins is offline
external usenet poster
 
Posts: 1,069
Default Return a name in the same row

Try this in B2 on Sheet1:

=VLOOKUP(A2,Sheet2!A:C,3,FALSE)

and copy B2 down as needed.

This version returns an empty string (the cell looks empty) if the CustNum
is not found on Sheet2:

=IF(ISERROR(VLOOKUP(A2,Sheet2!A:C,3,FALSE)),"",VLO OKUP(A2,Sheet2!A:C,3,FALSE))

Hope this helps,

Hutch

"Scott J" wrote:

I have a 2 sheet spreadsheet. I want a formula to match a cell in column A of
sheet 1 to a matching cell in column a of sheet 2 and return a name form the
same matching row in column C of sheet 2. I have searched for this formula
and cannot find it. Please help.

Scott

Sheet 1

CustNum
1
9
9
9
9
10
10
11
11
11
11
11
14
14
30
38
38
40
50
50
50
50


Sheet 2
CustNum ShopNum LastName
1 5 Name one
2 5 Name two
5 53 Name three
7 57 Name four
8 8 Name five
9 9 Name six
10 10 Name seven
11 11 Name eight
12 340 Name nine
13 12 Name ten
14 13 Name eleven
16 15 Name twelve
18 17 Name thirteen
19 18 Name fourteen
20 19 Name fifteen
22 21 Name sixteen
23 22 Name seventeen
24 23 Name eighteen
26 25 Name nineteen
27 26 Name twenty
28 27 Name twentyone
29 28 Name twentytwo