Checking for Thursday Transaction Dates

Written by Allen Wyatt (last updated August 22, 2026)

1

Kevin has transaction data for his company, and column G contains the date for each transaction. He needs to highlight transactions for which the date does not occur on a Thursday. (All of their transactions are to occur on Thursdays.) Kevin suspects this can be done with a conditional formatting rule, but he's not sure how to put the rule together.

You can set the proper conditional formatting rule by relying on the WEEKDAY function, which returns a number that represents the day of the week for a date. Follow these steps:

  1. Select column G. Assuming you select the entire column, then cell G1 should also be active.
  2. Make sure the Home tab of the ribbon is displayed.
  3. Click the Conditional Formatting tool. Excel displays a series of choices.
  4. Click New Rule. Excel displays the New Formatting Rule dialog box. (See Figure 1.)
  5. Figure 1. The New Formatting Rule dialog box.

  6. 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 2.)
  7. Figure 2. Use a Formula to Determine Which Cells to Format.

  8. In the formula space, enter the following formula: =WEEKDAY(G1)<>5
  9. Click the Format button. Excel displays the Format Cells dialog box. (See Figure 3.)
  10. Figure 3. The Format Cells dialog box.

  11. Using the controls in the dialog box, specify how you want the cells containing non-Thursday dates to be displayed.
  12. Click OK to dismiss the Format Cells dialog box.
  13. Click OK to accept your conditional format.

Excel immediately modifies the format of non-Thursday cells in column G to reflect your choices in step 8.

This is the simplest formula you can use in the conditional formatting rule, but there is a problem with it. If a cell in column G is empty, then it is formatted as "not a Thursday." If this bugs you as much as it would bug me, then you need to change the formula used in step 6 to one of these:

=AND(G1<>"",WEEKDAY(G1)<>5)
=AND(ISNUMBER(G1),WEEKDAY(G1)<>5)
=AND(NOT(ISBLANK(G1)),WEEKDAY(G1)<>5)

These all have the same result, so you should choose the one that makes the most sense to you. The AND function means, in this case, that two conditions need to be checked. The first condition is that the cell is not empty and the second is that the date in the cell is not a Thursday.

The formulas presented so far all use the WEEKDAY function to determine a numeric value for the day of the week. By default, WEEKDAY starts numbering days with Sunday, which means Thursday has a value of 5. You can use a second parameter with WEEKDAY, if you prefer, that starts the numbering with Thursday. Just replace the second check as illustrated here:

=AND(G1<>"",WEEKDAY(G1,14)>1)

There is one additional potential gotcha that you need to be aware of. Dates are stored internally as serial numbers. These numbers indicate the number of elapsed days since January 1, 1900. That day has a serial number of 1, the next day 2, the day after that 3, and so on. Because dates are numbers, WEEKDAY will return a weekday number for any numeric value in column G.

For instance, if you use the default format of WEEKDAY, then a value of 5 in a cell will be considered a Thursday. It doesn't matter if the cell is formatted as a date or not; WEEKDAY does this with any numeric value.

What does this mean in Kevin's situation? Just that if column G contains numbers other than dates, the conditional formatting rule may return results that you may find confusing. Like I said, it is a potential gotcha that you should be aware of. The cleanest way to get around the issue is to make sure that column G only contains three types of data: dates, text, or blanks.

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

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

Signing a Protected Form

Tablet PCs are great for some uses, such as signing forms developed in Word. You may run into a problem with getting the ...

Discover More

Disappearing Footnotes

Footnotes can be an integral part of many documents, particularly those written for a scholarly audience. If those ...

Discover More

Changing Your System Date and Time

Need to change the date and time maintained by Windows? It's easy to do using the steps in this tip.

Discover More

Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!

More ExcelTips (ribbon)

Changing Shading when a Column Value Changes

If you have a data table in a worksheet, and you want to shade various rows based on whatever is in the first column, ...

Discover More

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

Converting Conditional Formatting to Regular Formatting

Conditional formatting allows you to change how information is displayed based on rules you define. What if you want to ...

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 4 + 4?

2026-08-22 16:38:02

Tomek

You could add two more conditions to the second of the three alternate formulas to check that the number in the cell is greater than 0, and that it is formatted as a date: function CELL("format",G1) will return D1 to D9; so the first character will be "D".

=AND(ISNUMBER(G1), G1>0, LEFT(CELL("format",G1),1)="D",WEEKDAY(G1)<>5)

You need to test if the CELL function works with your date format. In my testing (MS365/Win11) it did not work if the date format was set to dd-mmm selected from the available date formats; it did work however with custom dd-mmm format; go figure.


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.