Excel – How to change default text color in MS Excel

automationformattingmicrosoft excel

How can I make many edits to a MS Excel 2010 spreadsheet and save the edits I make using a different color (i.e. RED). Right now, I have to change the color of each and every cell in the spreadsheet, one at a time, before I begin typing. This is rather tedious.

Question: Is there a way to 'switch' the 'default' text color from Black to Red, and have everything you type show up in RED and then switch back to Black after making the changes and have the text stay the color it was written (RED in this case)?

Thanks!

Best Answer

A quick solution would be to Open your VBA window (Alt+F11) > Select ThisWorkbook from the Project Window > Select Workbook from the Top Left dropdown > Select SheetBeforeDoubleClick from the Top Right dropdown and then enter the following code within the sub:

Target.Font.Color = 255

Note that this requires that you double-click the cells you want to edit (and change to red text) as opposed to another technique such as F2.

If instead you wish to toggle colors by double-clicking use the following code:

Select Case Target.Font.Color
    Case 0
        Target.Font.Color = 255
    Case 255
        Target.Font.Color = 0
End Select
Related Question