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

Jumping To a Comment

Got a document with lots of comments in it? You can navigate from comment to comment with ease by using the Go To tab of ...

Discover More

Clearing the Print Area

Excel allows you to specify which portions of a worksheet should be printed when you send output to your printer. If you ...

Discover More

Rejecting Changes in a Document

When a group of people edits a document with Track Changes turned on, it can be tempting for one of the editors to use ...

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)

Deleting Conditional Formatting

After you've applied a conditional format to a cell, you may have a need to later delete that format so that the cell is ...

Discover More

Stopping a Conditional Formatting Rule from Breaking into Smaller Ranges

When you paste information into a row that is conditionally formatted, you may end up messing up the rules applied to ...

Discover More

Conditional Formatting for Errant Phone Numbers

Conditional formatting can be used to draw attention to all sorts of data based upon the criteria you specify. Here's how ...

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 seven minus 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.