View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
David McRitchie David McRitchie is offline
external usenet poster
 
Posts: 903
Default Adding leading spaces

If those are numbers then you can use cell formatting
Format, Cells, custom

Here are three you can check out: (from my formula.htm page)
_($* #,##0.00_);_($* (#,##0.00);_($* "-"??_);_(@_)

with asterisk protection:
_($**#,##0.00_);[Red]_($**(#,##0.00);_($* "-"??_);_(@_)
_(**$#,##0.00_);[Red]_(**$(#,##0.00);_(**$0.00_);_(@_)

Additional examples at
http://www.mvps.org/dmcritchie/excel...m#numberformat

---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

wrote in message ups.com...
Some cells in Col A contain these amounts:

$.58
$1,267,98
$1.20
$10,098.23
$.01
$258,957,98

The horizontal alignment of these cells is left-justified.

How do I add blanks (spaces) in front of the dollar-sign so the last
character of the amount aligns with the right margin? (Note, I can't
just right-justify the cells)