Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 30
Default VLookup and text strings

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.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 563
Default VLookup and text strings

That is not what VLOOKUP is used for. See
http://spreadsheets.about.com/od/exc...320vlookup.htm

This returns the letters: =LEFT(A1,FIND("-",A1)-1)
This returns the number: =--MID(A1,FIND("-",A1)+1,99)
best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme

"bmac" wrote in message
...
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.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default VLookup and text strings

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)

--
Biff
Microsoft Excel MVP


"bmac" wrote in message
...
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.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 30
Default VLookup and text strings

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

"Bernard Liengme" wrote:

That is not what VLOOKUP is used for. See
http://spreadsheets.about.com/od/exc...320vlookup.htm

This returns the letters: =LEFT(A1,FIND("-",A1)-1)
This returns the number: =--MID(A1,FIND("-",A1)+1,99)
best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme

"bmac" wrote in message
...
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.


.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
using strings in vlookup function calls AtTheEndofMyRope Excel Worksheet Functions 5 August 30th 09 07:06 PM
Charting with missing data or empty strings from vlookup() MJS Charts and Charting in Excel 2 February 23rd 07 07:16 AM
Matching Two Text Strings to see if Like caldog Excel Worksheet Functions 4 December 29th 06 09:53 PM
Text Strings Swap Mzansi Excel Worksheet Functions 1 November 29th 05 11:04 AM
Separating Text strings. Quaisne Excel Discussion (Misc queries) 2 November 4th 05 06:49 PM


All times are GMT +1. The time now is 12:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"