Match cell in a range and return corresponding cell

Proteus

New Member
Joined
Dec 8, 2011
Messages
11
Hello brains trust. Two hours trying... and I'm stuck!
I'm migrating between CRM's and need to import old data to the new CRM. Same product but different product code.
In the screenshot attached, (ignoring the Sheets for now), I want to search the range D3:D24 for the data in A3.
If found, the data in the corresponding found cell should be inserted in B3 (assuming this is where the formula goes).
In this example, A3 (29309) matches with data in D12. So the data in E12 (a010) should be shown (in B3)
If not found, return nothing.

Appreciate any help.
 

Attachments

  • Screen Shot 2021-04-07 at 5.10.42 pm.png
    Screen Shot 2021-04-07 at 5.10.42 pm.png
    54.3 KB · Views: 45

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
in B3 Use this Formula

=INDEX(E3:E12,MATCH(A3,D3:D12,0))
 
Upvote 0
Classic
VBA Code:
=VLOOKUP(A3,D3:E24,2,0)
does not work?
 
Upvote 0
If not found, return nothing.
Then add this adjustment
Excel Formula:
=IFNA(VLOOKUP(A3,D3:E24,2,0),"")

BTW, I suggest that you update your Account details (click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
Solution
Then add this adjustment
Excel Formula:
=IFNA(VLOOKUP(A3,D3:E24,2,0),"")

BTW, I suggest that you update your Account details (click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
Bravo - thank you Peter_SSs this worked! You saved my brain from turning into mush! Big thanks to KOKOSEK too!
Other item noted but alas I am a heathen and fear ridicule on this esteemed forum (using Google Sheets!!). Still worked though.
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,607
Members
449,090
Latest member
vivek chauhan

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top