formulas needed

ericlch16

Active Member
Joined
Nov 2, 2007
Messages
313
Office Version
  1. 2016
  2. 2013
Platform
  1. Windows
Hello Experts

I have two sheets

Sheet 1
xxx123sad AAAA
dsfsdf124 BB


Sheet 2
123
124
126

I want a formula in sheet2 column B to return the corresponding value in sheet 1 if sheet 2!columnA is found in the string in sheet 1!column A.

**************************
The result should be

Sheet 2
123 AAAA
126 (empty since 126 cannot be found in sheet1!A column)
124 BB


I used sumproduct but cannot combine it with vlookup. Please help. Thank you. I would prefer not to use array if possible.
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Perhaps:

AB
Partial CodeValue
AAAA
BB

<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: center"]2[/TD]
[TD="align: right"]123[/TD]

[TD="align: center"]3[/TD]
[TD="align: right"]126[/TD]

[TD="align: center"]4[/TD]
[TD="align: right"]124[/TD]

</tbody>
Sheet2

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]B2[/TH]
[TD="align: left"]=IFERROR(LOOKUP(2^15,SEARCH(A2,Sheet1!$A$2:$A$10),Sheet1!$B$2:$B$10),"")[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
VLOOKUP works, you just have to use wildcards with it...

=IFERROR(VLOOKUP("*"&A1&"*",Sheet1!$A$1:$B$2,2,FALSE),"")
 
Upvote 0

Forum statistics

Threads
1,223,958
Messages
6,175,635
Members
452,661
Latest member
Nonhle

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