ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Return a name in the same row (https://www.excelbanter.com/excel-worksheet-functions/248784-return-name-same-row.html)

Scott J[_2_]

Return a name in the same row
 
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


Jacob Skaria

Return a name in the same row
 
Try the below in Sheet1 with Custnumber in A1
=VLOOKUP(A1,Sheet2!A:C,3,0)

If this post helps click Yes
---------------
Jacob Skaria


"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


Tom Hutchins

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


Scott J[_2_]

Return a name in the same row
 
Thank You Tom and Jacob. It worked fine.

"Tom Hutchins" wrote:

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



All times are GMT +1. The time now is 09:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com