search for a string in cell having multiple string

sandhya16

New Member
Joined
Jun 8, 2015
Messages
34
i am looking for a code to search for a single cell value in multiple cell value and return the adjacent cell for eg-


in sheet 1-
A B
4F876




Sheet 2-


A B


4F876 4M4646 5GAR 100




Column B in sheet 1 should return 100 value.


Please help.
 
My bad, the first literal string should be "* ", rather than the space star I posted above.

Although, looking at your data, it looks like it would be safe to remove the spaces from both the literals.


=VLOOKUP("*" & A1 & "*", Sheet2!A1:B20, 2, FALSE)
 
Upvote 0

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
this formula worked but every time i have to press enter button in order to get the output.How to resolve this issue?



My bad, the first literal string should be "* ", rather than the space star I posted above.

Although, looking at your data, it looks like it would be safe to remove the spaces from both the literals.


=VLOOKUP("*" & A1 & "*", Sheet2!A1:B20, 2, FALSE)
 
Upvote 0
What do you mean "press the enter button"?

Yes you have to press enter when entering a value into a cell (i presume you are talking about entering into A1)

That is how Excel works, there is no way around it.
 
Upvote 0
I had to change the calculation options to "Automatic" .It worked perfectly fine.Thanks a lot

What do you mean "press the enter button"?

Yes you have to press enter when entering a value into a cell (i presume you are talking about entering into A1)

That is how Excel works, there is no way around it.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,323
Members
452,635
Latest member
laura12345

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