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?
Comment
Watch Question

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

Sub FormatCells()
    Range("A1:B10").Select
    Selection.NumberFormat = "$#,##0.00"
End Sub

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

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