Shading a Cell Until Something is Entered
Please Note: This article is written for users of the following Microsoft Excel versions: 2007 and 2010. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Shading a Cell Until Something is Entered.
When creating a worksheet in which information must be entered into specific cells, you may find it helpful to shade the cells if they are blank, but have the shading removed if something is entered into the cell. You can easily accomplish this task by using the conditional formatting feature in Excel. Follow these steps:
- Select the cells to which the conditional formatting should apply.
- Display the Home tab of the ribbon.
- Click the Conditional Formatting tool in the Styles group. Excel displays a list of conditional formatting options.
- Choose New Rule. Excel displays the New Formatting Rule dialog box.
- In the list of rule types, select Use a Formula to Determine which Cells to Format. (See Figure 1.)
Figure 1. The New Formatting Rule dialog box.
- In the formula area, enter the following formula, replacing A1 with the address of the active cell selected in step 1:
- Click Format to display the Format Cells dialog box.
- Click the Fill tab. (See Figure 2.)
Figure 2. The Fill tab of the Format Cells dialog box.
- Select the color you want used for shading the cell if it is blank.
- Click OK to dismiss the Format Cells dialog box. The shading color you selected in step 9 should now appear in the preview area for the rule.
- Click OK.
All the empty cells among those selected in step 1 should now appear shaded. When you enter something into one of the shaded cells, the shading should disappear.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (6867) applies to Microsoft Excel 2007 and 2010. You can find a version of this tip for the older menu interface of Excel here: Shading a Cell Until Something is Entered.
Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!
Leave your own comment:
Comments for this tip:
Patti 13 Jun 2016, 10:45
I need to use multiple rules for Conditional formatting, but I don't know how to make them all work together.
1) First, I want one cell turned Orange if a specific field to the left says "YES".
2) Once data is entered in that cell, I want the fill color removed - UNLESS the next condition is triggered-
3) Change fill color to RED if the contents doesn't exactly match the contents of a specific other cell in the same row.
I have a spreadsheet where I'm checking revisions of various documents based off a main file. So one field indicates Yes or No, as to whether a certain document exists that's based off the main file (so I know to record the revision of the supporting document, that should match the revision of the main file).
Then when I record the numeric revision of the main file, if the revision doesn't match the main file, the cell should fill with red.
Any help in combining these rules would be appreciated. I've been able to get them to work separately but I can't seem to get them to all work together correctly.
Mohammed Mirghani Othman 08 Sep 2015, 07:52
You can do this task more easier by choosing the Command Conditional Formatting-Format only cells that contain and from drop list below choose Blanks
Antony 09 Oct 2014, 05:44
Thanks for the answer...!
Bryan 01 May 2013, 07:49
As you point out on <a href="http://excelribbon.tips.net/T007131_Conditional_Formats_that_Distinguish_Blanks_and_Zeroes.html">this tip</a>, Excel already has a built-in way to highlight blank cells without needing to resort to a formula (New Rule > Format only cells that contain > Blanks).