Vlookup in ~ or special character

HarunSumon

New Member
Joined
Nov 14, 2013
Messages
3
Dear Concern,

I need to lookup value even though having special character in between. e.g.

in a table one column written as "POWER 0132: Hardware Installation and Supervision, Inverter 2~3 Cabinet (Outside Dhaka)" and next right column is "SITE".

my Query is, how to use vlookup in this case to lookup value "SITE" in another workbook?

Please help with solution at your earliest.

Thanks,
HarunSumon
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
use two ~~

Excel 2010
AB
POWER 0132: Hardware Installation and Supervision, Inverter 2~3 Cabinet (Outside Dhaka)

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

[TD="align: right"]SITE[/TD]

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

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

</tbody>
Sheet11

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: #DAE7F5"]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]A3[/TH]
[TD="align: left"]=VLOOKUP("*"&"~~"&"*",$A$1:$B$1,2,FALSE)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 
Last edited:
Upvote 0
If you add a SUBSTITUTE function into the lookup value of a regular VLOOKUP, to replace "~" with "~~" as shyy says, that that will work whether the lookup value contains "~" or not, e.g.

=VLOOKUP(SUBSTITUTE(A2,"~","~~"),B$2:C$100,2,0)
 
Upvote 0
use two ~~

Excel 2010
AB
POWER 0132: Hardware Installation and Supervision, Inverter 2~3 Cabinet (Outside Dhaka)

<tbody>
[TD="align: center"]1[/TD]

[TD="align: right"]SITE[/TD]

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

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

</tbody>
Sheet11

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<tbody>[TR="bgcolor: #DAE7F5"]
[TH]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
[TR]
[TH="bgcolor: #DAE7F5"]A3[/TH]
[TD="align: left"]=VLOOKUP("*"&"~~"&"*",$A$1:$B$1,2,FALSE)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
[Thanks for your prompt reply :)]
 
Upvote 0
If you add a SUBSTITUTE function into the lookup value of a regular VLOOKUP, to replace "~" with "~~" as shyy says, that that will work whether the lookup value contains "~" or not, e.g.

=VLOOKUP(SUBSTITUTE(A2,"~","~~"),B$2:C$100,2,0)

your reply was outstanding and I applied it in my problem for solution. Thank you once again
 
Upvote 0

Forum statistics

Threads
1,223,360
Messages
6,171,629
Members
452,412
Latest member
thomasleysen531

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