View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Formating a cell

If you want to do it with a formula (as you requested), try this one...

=SUBSTITUTE(SUBSTITUTE(A1," ",""),"-"," - ")

If you want to do it with Excel's function, I would suggest first replacing
the space character with nothing and then replacing the dash with space
dash space.

--
Rick (MVP - Excel)


"Smiley" wrote in message
...
Hi! I am working on a spreadsheet where I have 5 columns of time. I need
to
reformat all 5 columns to be the same. My time reads for example, 11:55 -
12:45. I want to reformat the cell so that there is a space before and
after
the hyphen. Is there a formula to help me with this? I really don't want
to
have to go to each cell and add those spaces.

Please help!