Space-aligned date cell format

Go To StackoverFlow.com

2

I'd like to format my dates as follows:

12/24/2012
 1/15/2012
 1/ 4/2012
12/ 3/2012

I expected the following custom format to do the trick: _m/_d/yyyy. However, when I try to use that I get the following error message:

Microsoft Excel cannot use the number format you typed.

2012-04-05 20:13
by mwolfe02


1

I don't know any way to do that with cell formats alone. If you have a date in A1 you can make it look that way with a formula in B1, i.e.

=MID(SUBSTITUTE("/"&TEXT(A1,"mm/dd/yyyy"),"/0","/ "),2,10)

Then use a font with a fixed character width like courier

2012-04-05 20:28
by barry houdini


0

Nice question. The closest I can get is _m/dd/yyyy, where "_" represents a space. The results look like:

  1/08/2012
  1/09/2012
  1/10/2012
  1/11/2012
  1/12/2012
 12/12/2012

I like the way it looks without the gap in the days less than nine.

EDIT Ha! It just dawned on me the leading space does nothing. Definitely lost the forest for the trees in fiddling with this.

2012-04-05 20:35
by Doug Glancy
Ads