Share via

Using specific name to return the value

Anonymous
2023-07-06T19:18:49+00:00

I have two sheets, on sheet one with two header, one is “name” and the other is “code”. On sheet two I have “name”, “code” and five more columns. Sheet 2’s name is fewer than Sheet 1. Let’s say sheet 1 have 20 names, sheet two have 10 names, and these 10 names were included in sheet 1’s names, but in different order, even after sorting by alphabet it’s still different because one of the sheet have fewer names. I need a formula to put on sheet 2 that when it’s “name”, it can return the “code” from sheet 1. Can someone advise me what to do please?

Example:

Sheet 1

NAME CODE

AAA 111

BBB. 222

CCC. 333

DDD. 444

EEE. 555

Sheet 2

NAME. CODE

BBB.

DDD

EEE

Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2023-07-06T19:41:28+00:00

Dear respected Stardust61792,

Good day! Thank you for posting to Microsoft Community. We are happy to help you.

As per your description, to retrieve the corresponding code from Sheet 1 for each name in Sheet 2, you can use the VLOOKUP formula.

Here is Formula for your reference: =VLOOKUP(A2, Sheet1!A:B, 2, FALSE)

If there is any misunderstanding, I apologize and please feel free to post back to us with more detailed information for better understanding and guiding you further.

Appreciate your patience and understanding and thank you for your time and cooperation.

Sincerely,

Waqas Muhammad

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

Answer accepted by question author

triptotokyo-5840 36,686 Reputation points Volunteer Moderator
2023-07-06T19:38:53+00:00

I have two sheets, on sheet one with two header, one is “name” and the other is “code”. On sheet two I have “name”, “code” and five more columns. Sheet 2’s name is fewer than Sheet 1. Let’s say sheet 1 have 20 names, sheet two have 10 names, and these 10 names were included in sheet 1’s names, but in different order, even after sorting by alphabet it’s still different because one of the sheet have fewer names. I need a formula to put on sheet 2 that when it’s “name”, it can return the “code” from sheet 1. Can someone advise me what to do please?

Example:

Sheet 1

NAME CODE

AAA 111

BBB. 222

CCC. 333

DDD. 444

EEE. 555

Sheet 2

NAME. CODE

BBB.

DDD

EEE

In Sheet2 assuming that you have:-

Name in cell A 1

 - and:-

Code in B 1

 - in Sheet2 cell:-

B 2

 - type in:-

=VLOOKUP(A2,Sheet1!$A$2:$B$21,2,FALSE)

 - and then copy the above formula down column B as far as required.

I reckon that gives you what you want. Do you agree?

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2023-07-06T19:31:31+00:00

    Hi there

    According to your question these videos will help you

    Regards

    Jeovany

    https://youtu.be/T0L-s86p1_g

    https://youtu.be/h5abzTVqMiE

    https://youtu.be/hwL6KKJP-_I

    Was this answer helpful?

    0 comments No comments