Formatting number as accounting

R

Rick

I have not had any luck formatting a number entered to a
worksheet by a procedure so that it appears in Accounting
rather than Currency format. If the cell width is large
enough, they do appear differently when using the cell
format feature manually. I have tried: format
(thenumber,"$* ###,###.##") and (thenumber,"$###,###.##")
without success. Any ideas?
 
J

Jim Rech

If I understand your problem...

I think you want to format the cell separately from entering the value:

With ActiveCell
.NumberFormat = "_($* #,##0.00_);_($* (#,##0.00);_($* ""-""??_);_(@_)"
.Value = 1234567
End With


--
Jim Rech
Excel MVP
|I have not had any luck formatting a number entered to a
| worksheet by a procedure so that it appears in Accounting
| rather than Currency format. If the cell width is large
| enough, they do appear differently when using the cell
| format feature manually. I have tried: format
| (thenumber,"$* ###,###.##") and (thenumber,"$###,###.##")
| without success. Any ideas?
 
Top