We help IT Professionals succeed at work.

How can I format cells using Excel Macro?

I need to format cells, Number, for two specific columns.
How can I use a macro in Excel to do this?
Watch Question

Select the range you want then use Selection.NumberFormat. Currency format looks like this:

Sub FormatCells()
    Selection.NumberFormat = "$#,##0.00"
End Sub

Martin Liss"There is still no cure for the common birthday." ~John Glenn
Most Valuable Expert 2017
Distinguished Expert 2018

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.