# Mix of Vlookup, find and substitute

#### Cooki

##### Board Regular
Hi All

Have issues with this formula

=VLOOKUP(FIND("*",SUBSTITUTE(A8,".","*",LEN(A8)-LEN(SUBSTITUTE(A8,".","")))),Data!B:C,2,0)

What i want is to do a Vlookup on everything in the cell up to the full STOP (.).

This formula is giving me the position of the last full stop

FIND("*",SUBSTITUTE(A8,".","*",LEN(A8)-LEN(SUBSTITUTE(A8,".",""))))

but now i want to include vlookup everything up to the full stop

Any ideas?

### Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

#### raj08536

##### Active Member
Can you share screenshot?

#### Dave Patton

##### Well-known Member
=LEFT(A8,FIND("*",SUBSTITUTE(A8,".","*",LEN(A8)-LEN(SUBSTITUTE(A8,".",""))))-1)

#### Cooki

##### Board Regular Changed formula just for the screen shot

=VLOOKUP(FIND("*",SUBSTITUTE(A8,".","*",LEN(A8)-LEN(SUBSTITUTE(A8,".","")))),\$A\$16:\$B\$20,2,0)

Last edited:

#### Cooki

##### Board Regular

=LEFT(A8,FIND("*",SUBSTITUTE(A8,".","*",LEN(A8)-LEN(SUBSTITUTE(A8,".",""))))-1)

No still get N/A

#### Dave Patton

##### Well-known Member
You left out part of the suggestion.
Try using Excel's Formula Evaluate.
The info below also shows an alternative
I just read your message again. You may not need the minus 1 since your Table has a decimal at the end.

T202007b.xlsm
ABCDE
8abc.def.a99899
5c
Cell Formulas
RangeFormula
B8B8=VLOOKUP(LEFT(A8,FIND("*",SUBSTITUTE(A8,".","*",LEN(A8)-LEN(SUBSTITUTE(A8,".",""))))-1),A16:B20,2,0)
C8C8=FIND("~",SUBSTITUTE(A8,".","~",2))
E8E8=VLOOKUP(LEFT(A8,FIND("~",SUBSTITUTE(A8,".","~",2))-1),A16:B20,2,0)

T202007b.xlsm
ABCDEF
8abc.def.a9999
5c
Cell Formulas
RangeFormula
B8B8=VLOOKUP(LEFT(A8,FIND("*",SUBSTITUTE(A8,".","*",LEN(A8)-LEN(SUBSTITUTE(A8,".",""))))),A16:B20,2,0)
E8E8=VLOOKUP(LEFT(A8,FIND("~",SUBSTITUTE(A8,".","~",2))),A16:B20,2,0)

Last edited:
• Cooki

#### Dave Patton

##### Well-known Member
My suggestions assumed that there were 2 "." and you wanted to stop at the last "."

To post a clear example of your challenge with information that we can use, see the link to XL2BB.
T202007b.xlsm
ABCDE
8HT/HP Report:HHDC.XXXXXXX99991899
5c
Cell Formulas
RangeFormula
B8B8=VLOOKUP(LEFT(A8,FIND("*",SUBSTITUTE(A8,".","*",LEN(A8)-LEN(SUBSTITUTE(A8,".",""))))),A16:B20,2,0)
C8C8=VLOOKUP(LEFT(A8,FIND("~",SUBSTITUTE(A8,".","~",1))),A16:B20,2,0)
D8D8=FIND(".",A8,1)
E8E8=VLOOKUP(LEFT(A8,FIND(".",A8,1)),A16:B20,2,0)

Last edited:
• Cooki

#### Cooki

##### Board Regular
You left out part of the suggestion.
Try using Excel's Formula Evaluate.
The info below also shows an alternative
I just read your message again. You may not need the minus 1 since your Table has a decimal at the end.

T202007b.xlsm
ABCDE
8abc.def.a99899
5c
Cell Formulas
RangeFormula
B8B8=VLOOKUP(LEFT(A8,FIND("*",SUBSTITUTE(A8,".","*",LEN(A8)-LEN(SUBSTITUTE(A8,".",""))))-1),A16:B20,2,0)
C8C8=FIND("~",SUBSTITUTE(A8,".","~",2))
E8E8=VLOOKUP(LEFT(A8,FIND("~",SUBSTITUTE(A8,".","~",2))-1),A16:B20,2,0)

T202007b.xlsm
ABCDEF
8abc.def.a9999
5c
Cell Formulas
RangeFormula
B8B8=VLOOKUP(LEFT(A8,FIND("*",SUBSTITUTE(A8,".","*",LEN(A8)-LEN(SUBSTITUTE(A8,".",""))))),A16:B20,2,0)
E8E8=VLOOKUP(LEFT(A8,FIND("~",SUBSTITUTE(A8,".","~",2))),A16:B20,2,0)

Worked prefect thanks Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

### Forum statistics

1,164,446
Messages
5,837,299
Members
430,494
Latest member
abhi_is_yours ### 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.

### Which adblocker are you using?    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

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