Record a Macro

Record a macro is the simplest way to enhance the power of excel.
And you do not have to know programming to make use of macros to enhance
the your productivity. In this example, we are going to share with you how
you can record a macro that will format
the cell with a number format that is not provided by any of the Excel icons.
To make it complete, we need to create an icon and assign the macro to the icon,
First let us show you how to record the macro and save it such that you can use
it in all the worksheets.

Enter a number in the active cell. Make sure this cell is selected before you record the
macro.

Go to the menu, click on Tools --> Macro --> Record New Macro.

Enter a name for the macro e.g. Custom_Num_Format (note: spaces are not allowed),
select to store the macro in "Personal Macro Workbook".

Once macro recording starts, try not to touch the worksheet. If you accidentally select
a cell in the porcess, the action will be captured and the macro will always include
this action of selecting the cell.

Go to the menu bar and select Format -> Cells.

In the Format Cell window, select the Number Tab.

Select the number category, check the box "Use 1000 Separator (,)",
select the negative number format with bracket. In this step, you can choose your
own number formatting.

Go to the Patterns Tab and select the color RED to colour the selected cell. You can
choose to skip this step if you do not want format the cell RED.

Click OK to exit Format Cell Dialog box.

Stop the Macro Recorder by click on the pop up box. ALTernatively,
goto to menu, click on Tools --> Macro --> Stop Recording.

Close the Excel Application. You can click on the big RED X on the top right hand corner.
There will be a number of prompts depending on how many worksheets are opened. Look out for
the prompt on whether you want to save the changes made to the personal macro
workbook. Click Yes. This will save the macro and make it available for use every time
you open Excel.