VLookup and text strings

B

bmac

Hello, I am using the vlookup function. I have values that have three to nine
text characters followed by numbers. Examples are COM-123, COM-124, ABCD-12,
ABCD-13, etc,. The number of letters may be 2-9. I want to modfiy my lookup
formula so that COM-123 returns the value COM. Or ABCD-13, returns the value
ABCD.

Any help appreciated.
 
T

T. Valko

I want to modfiy my lookup formula so that
COM-123 returns the value COM. Or
ABCD-13, returns the value ABCD.

In other words, you want everything the the left of the dash?

A1 = COM-123

=LEFT(A1,FIND("-",A1)-1)
 
B

bmac

Thanks, I probably did not explain this well about VLookup -- however, your
solution works much better, thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top