Change color of cell content using a shortcut
It is frustrating to format the report in excel. Most of the companies follows certain guidelines to present the report in a specified format like column headings should be in grey background color, the font size should be 8 etc. Changing the content color of the cell is done too often. To work faster you can use a shortcut to change the color of any cell or group of cells that you have selected.
1. Create a new Module and enter the following piece of code in it.
Sub change_color() Selection.Font.Color = RGB(255, 0, 0) End Sub
The code above is self explanatory. It will change the font color of the selected cells to whatever specified in the right hand side.
RGB(255,0,0) is the Red color.
RGB(0,255,0) is the Green color.
RGB(0,0,255) is the Blue color.
2. Now press ALT + F8. A new macro with the name change_color will now be visible. Now you can assign this Macro to a shortcut to run it directly. Click on the Options and assign a Shortcut Key like "e". Don't use system defined shortcuts like "s" which is for saving the file.
3. After doing this just select the cell(s) and press CTRL + e or whatever shortcut key you have assigned in the step 2 above. The color of the cell content will be changed instantly.
See how simple it is to use VBA to create these small macros to make you more efficient in Excel!