View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JE McGimpsey
 
Posts: n/a
Default Custom Format alphanumberic value with spaces

Mixed alphanumerics are text, and custom (number) formats won't do
anything with text. You could use an event macro to insert the dashes
(but that will change the actual value, not just the display), or you
can use another cell, e.g.:

=LEFT(A1,1)&"-"&MID(A1,2,3)&"-"&MID(A1,5,4)...


In article ,
"Bruce" wrote:

This ones more formatting related than formula but I didn't know where else
to put it.

Say I enter the value c7454951000000cgvxx I want to pre-format it
with predefined '-' after a certain number of characters.....

I intend the formatting will change my value to;
C-745-4951-000-000-CGV-XX

I have tried the following custom format but it did not work..
#-###-####-###-###-###-##

Does anyone have any suggestions?

Bruce