View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
FSt1 FSt1 is offline
external usenet poster
 
Posts: 3,942
Default Formating Question

hi
not sure if you can do this with a format but this might work for you
=IF(LEN(A12)4,LEFT(A12,3) & " " &RIGHT(A12,2),LEFT(A12,2)&"_ "&RIGHT(A12,2))
that wrapped. it's all one line. i was confused by what you ment by...
DD__MX so i put a space and an underscore. replace it with what you need.
Adjust ranges to fit your data. copy down. copy formulas and paste a values.

Regards
FSt1
"carl" wrote:

Raw Formated
HPQEI HPQ EI
HPQBV HPQ BV
DDMX DD MX
EMCPE EMC PE


I am trying to convert (reformat) ColA to ColB. The right 2 characters need
to be separated from the other characters by a space AND the left characters
need to have a length of 3. For example, for row 3 (DDMX), I need the
formated value to be DD__MX.

Thank you in advance.