The question you tried to load has been merged into the question below

Asked • 03/19/19

VBA number formatting?

I am writing a macro package to format numbers in accounting format so that I don't have to click "alt - h - fm" every time I want to make a number accounting format (which my job requires). I have the code up to a certain point, but it is not matching excel's accounting format. Right now the $ appears one space before the number, rather than at the left edge of the cell (like it does for excel's accounting format). My present code formats to thousands with no decimals, all that is wrong is that the dollar sign doesn't appear at the left edge of the cell. Here is my code for the number format: Selection.NumberFormat = "_(* $ #,##0_);_(* $ (#,##0);_(* ""$ -""?_);_(@_)" How should I change it so that the dollar sign appears at the beginning of the cell? Thank you for the help! this has been stumping me for a while now...

2 Answers By Expert Tutors


Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.


Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.