Highlighting an Entire Row for the Current Date

Written by Allen Wyatt (last updated September 30, 2023)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021


Ronald has a worksheet with 365 or 366 rows, one for each day. The date is in column B. Using conditional formatting he can highlight the current date, but Ronald wonders how he can highlight the whole row for the current date.

This is relatively easy to do, provided you know a trick in setting your conditional formatting rule. Let's say that you have your data in the range of A1:T367, with the first row being used for column headings. You need to select all the rows that may have dates in them. So, in this case you would either select the range A2:T367, or simply select rows 2 through 367. (Either selection will work just fine.) Now, follow these steps:

  1. Make sure the Home tab of the ribbon is displayed.
  2. Click the Conditional Formatting tool. Excel displays a series of choices.
  3. Click New Rule. Excel displays the New Formatting Rule dialog box.
  4. In the Select a Rule Type area at the top of the dialog box, choose Use a Formula to Determine Which Cells to Format. (See Figure 1.)
  5. Figure 1. The New Formatting Rule dialog box.

  6. In the formula space, enter the following formula:
  7.      =$B2=TODAY()
    
  8. Click on the Format button. Excel displays the Format Cells dialog box.
  9. Use the controls in the dialog box to specify how you want your row formatted.
  10. Click OK to close the Format Cells dialog box.
  11. Click on OK to close the New Formatting Rule dialog box.

The "trick" I mentioned earlier is in step 5, when you define your formula. Remember that you started out by selecting a large range of cells or a large number of rows. That selection determines the cells to which the conditional formatting rule will be applied. However, the formula indicates that only the values in column B will be taken into consideration when evaluating the rule. This is the purpose of the dollar sign ($) it indicates an absolute column, one that doesn't change. Thus, all cells will be formatted when the formula is true, meaning that the date in column B is equal to today.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (13389) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Adding Hyphens to Phrases

Editing text to turn regular words into hyphenated phrases can be a real bother. The chore can become a breeze if you ...

Discover More

Resolving Revisions

You've reviewed the changes that were made to your workbook using the Highlight Changes tool. Now you need to remove the ...

Discover More

Changing the Reference in a Named Range

Define a named range today and you may want to change the definition at some future point. It's rather easy to do, as ...

Discover More

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!

More ExcelTips (ribbon)

Conditionally Highlighting a Milestone Cell

Sometimes it can be difficult to figure out the exact formula you should use to properly apply a conditional formatting ...

Discover More

Highlighting Values that are 10x a Baseline Value

Sometimes the hardest part of getting your conditional formatting rules to work properly is figuring out the proper way ...

Discover More

Changing Font Face and Size Conditionally

Conditional formatting does not allow you to change the typeface and font size used in a cell. You can write your own ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is four less than 7?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.