View Single Post
  #5   Report Post  
zackb
 
Posts: n/a
Default

The FIND function ..

FIND(" ",C2,1)

...gives us the location of the first space in thecell. We minus one to take
out the character of the space (location). With the LEFT function that
leaves us with the first part of the cell up to the space (just prior to).
So it will reduce this ..

050505 - 121212 - 555aaa

... to this ...

050505

Then this value is plugged into the VLOOKUP function as a standard cell
reference would be. The zero on the end is equivelant to the FALSE syntax
statement of the formula.

--
Regards,
Zack Barresse, aka firefytr


"jenhow" wrote in message
...
Thanks. That worked perfectly. But can you explain how the formula works
to me?

VLOOKUP(LEFT(C1,FIND(" ",C2,1)-1),A:B,2,0)