# Vlookup after LEFT, TRIM and still receiving ERROR

#### Aryatect

##### Active Member
Yup that is correct @jtakw, I assumed ad space in between, yours is more robust formula.

### Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

#### StickyNote1

##### New Member
Not sure who's formula you're referring to, but just want to point out, formula posted in Post # 6 will fail for Single Word or more than 2 word Vessel names since it relies on the 2nd CHAR(160), whereas my formula in Post # 7 will work for Any number of words for Vessel names.

Anyhow, you're welcome, and welcome to the forum.

GHIJ
4AS FAUSTINA V. 22AFAAFA
5Acapulco V. 22ACA#N/A
6AS FAUSTINA V. 22AFAAFA
7My formulaPost #6

</tbody>
Sheet1

Worksheet Formulas
CellFormula
I4=VLOOKUP(TRIM(LEFT(SUBSTITUTE(G4,CHAR(160)," "),SEARCH("V.",G4)-1)),'Vlookup Data'!B:C,2,0)
J4=VLOOKUP(SUBSTITUTE(LEFT(G4,SEARCH("/",SUBSTITUTE(G4,CHAR(160),"/",2))-1),CHAR(160)," "),'Vlookup Data'!B:C,2,FALSE)

</tbody>

<tbody>
</tbody>
Hello everyone i tried to apply the I4 formula to this problem but cant seem to get it. I have provided a Link for your ease of review to this issue:

https://www.dropbox.com/s/fxob5p0ofprl85f/ZZZZZZZZZZZZZ.xlsx?dl=0

The issue is I cant Vlookup Column C from Array B:C with Lookup Value Column E

Cheers.

#### StickyNote1

##### New Member
@jtakw, @Aryatect

Hello I tried to apply the I4 formula to this problem but cant seem to get it. I have provided a Link for your ease of review to this issue:

https://www.dropbox.com/s/fxob5p0ofp...ZZZZ.xlsx?dl=0

The issue is I cant Vlookup Column C from Array B:C with Lookup Value Column E it generates the wonderful #N/A

Cheers. Any help is appreciated.

#### Aryatect

##### Active Member
Hi, This is a different question from the previous one, there you were looking for the text left of "V." which had CHAR(160). Here you have everything same, except CHAR(160) as an invisible character in the lookup value and CHAR(32) or space in the table array. In this case below formula in Cell G4 and copying it down will work:

Code:
``=VLOOKUP(SUBSTITUTE(E7,CHAR(160)," "),\$B\$7:\$C\$10,2,FALSE)``

#### StickyNote1

##### New Member
Aryatect,

Your suggested formula worked great, thank you. I do have a question how you usually know when a cell has special characters to applie CHAR 160 or 62? Just by trial and error or do you have another process?

#### Aryatect

##### Active Member
Glad could help and thanks for the feed back. I usually look for each character like below:

Last edited:

#### StickyNote1

##### New Member
Hi, This is a different question from the previous one, there you were looking for the text left of "V." which had CHAR(160). Here you have everything same, except CHAR(160) as an invisible character in the lookup value and CHAR(32) or space in the table array. In this case below formula in Cell G4 and copying it down will work:

Code:
``=VLOOKUP(SUBSTITUTE(E7,CHAR(160)," "),\$B\$7:\$C\$10,2,FALSE)``
Aryatect,

Your suggested formula worked great, thank you. I do have a question how you usually know when a cell has special characters to applie CHAR 160 or 62? Just by trial and error or do you have another process?

#### StickyNote1

##### New Member
Understood I see; thanks again and have a good weekend.

#### Aryatect

##### Active Member
Glad to help and you have a great weekend too!

1,102,263
Messages
5,485,744
Members
407,512
Latest member
PearceK

### This Week's Hot Topics

• Finding issue in If elseif else with For each Loop
Finding issue in If elseif else with For each Loop I have tried this below code but i'm getting in Y column filled with W005. Colud you please...
• MsgBox Error
Hi Guys, I have the below error show up when i try and run my macro in File1 but works fine if i copy and paste the same code into file2. [ATTACH...
• CELL FORMAT - IF CONDITION
My Cell Format is [B]""0.00" Cr". [/B]But in the cell, it is showing 123.00 for editing. (123 is entry figure). (Data imported from other...
• Show numbers nearly the same
Is this possible. I have a number that can change very time eg 0.00001234 Then I have a lot of numbers 0.0000001, 0.0000002, 0.00000004...
• Please i need your help to create formula
I need a formula in cell B8 to do this >>if b1=1 then multiply ( cell b8) by 10% ,if b1=2 multiply by 20%,if=3 multiply by 30%. Thank you in...
• Got error while adding column and filter
Got error while adding column and filter In column Z has some like "Success" and "Error". I want to add column in AA if the Z cell value is...