ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Formatting number as accounting (https://www.excelbanter.com/excel-programming/294528-formatting-number-accounting.html)

Rick[_19_]

Formatting number as accounting
 
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?

Jim Rech

Formatting number as accounting
 
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
"Rick" wrote in message
...
|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?




All times are GMT +1. The time now is 12:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com