View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
XP XP is offline
external usenet poster
 
Posts: 389
Default Extract string from cells

Suppose I have data that looks something like:

1A-Data
1B5D-Data-4F
3RCDF-AA-Data
5L-L-Data

The strings may be any length, but I need to get any characters to the left
of the first dash in each string (row). So the above should return:

1A
1B5D
3RCDF
5L

The data resides in one column (col "I") and may be variable in the number
of rows. I would like the extracted info from each row written into the
adjacent column (Col "J").

Thanks much in advance for your example code.