Thread: Mid or Right
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Mid or Right

You say the hyphen comes immediately after your 6 digit number, but your
examples show a space between them and also one after the hyphen. So, if
there really are *no* spaces in either location, then you can use this...

=MID(A1,8,99)

where the 99 assumes your text after the hyphen is no longer than 99
characters in length (if it can be, just make the 99 value larger). If there
are spaces in both locations, you can do this instead...

=MID(A1,10,99)

If there is no space before the dash, but there might or might not be a
space after it, then you can do this...

=TRIM(MID(A1,9,99))

--
Rick (MVP - Excel)


"bg" wrote in message
...
Good Morning,
Is there a way to take data from the point in the cell that it contains
a -
(hyphen)
for example, the length can chg but it will always be 6 numbers and then a
hypen and then the part I want (ie . Sales order 1 etc..)

123456 - Sales order 1
234567 - Sales order 15