Vlookup or Match help?

sherafyk

New Member
Joined
Aug 19, 2016
Messages
7
Hello, I've been trying to figure out what formula to use so that when I input it in Sheet1 column B, it looks up the string "USERID1" in column A (the url) and matches it with column A in sheet 2, and the result is the value in column B (clientName)

Sheet1
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Column A[/TD]
[TD]Column B[/TD]
[/TR]
[TR]
[TD]https://example.com/USERID1/randomvalues[/TD]
[TD]=formula for client name[/TD]
[/TR]
[TR]
[TD]https://example.com/USERID1/randomvalues[/TD]
[TD]=formula for client name[/TD]
[/TR]
</tbody>[/TABLE]

Sheet2
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Column A[/TD]
[TD]Column B[/TD]
[/TR]
[TR]
[TD]USERID1[/TD]
[TD]ClientName1[/TD]
[/TR]
[TR]
[TD]USERID2[/TD]
[TD]ClientName2[/TD]
[/TR]
</tbody>[/TABLE]

I'd appreciate any and all help. I've been at this for a few hours with no luck. Thank you!
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
In B2 of Sheet1 enter and copy down:

=IFERROR(LOOKUP(9.99999999999999E+307,SEARCH("/"&Sheet2!$A$2:$A$3&"/",$A2),Sheet2!$B$2:$B$3),"")
 
Upvote 0
Wow, thank you so much. It works perfectly. I was dabbling with IFERROR as well but would never have thought of this. Thanks again!!!
 
Upvote 0

Forum statistics

Threads
1,225,156
Messages
6,183,224
Members
453,152
Latest member
ChrisMd

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