Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • Chart Axes in Excel
  • How To Create Pareto Chart in Excel
  • How to Sort by Color in Excel
  • Error Bars in Excel
  • Understanding Pivot Tables in Excel

References

  • How to reference named range different sheet in Excel
  • How to use Excel OFFSET function
  • How to get last row in text data in Excel
  • Two-column Lookup in Excel
  • How to get address of first cell in range in Excel

Data Validations

  • Excel Data validation exists in list
  • Data validation must not exist in list
  • Prevent invalid data entering in specific cells
  • Excel Data validation must begin with
  • Excel Data validation must contain specific text

Highlight dates that are weekends in Excel

by

This tutorial shows how to Highlight dates that are weekends in Excel  using the example below;

Formula

=OR(WEEKDAY(A1)=7,WEEKDAY(A1)=1)

Explanation

If you want to use conditional formatting to highlight dates occur on weekends (i.e. Saturday or Sunday),  you can use a simple formula based on the WEEKDAY function.

For example, if you have dates in the range C4:C10, and want to weekend dates, select the range C4:C10 and create a new conditional formatting rule that uses this formula:

=OR(WEEKDAY(C4)=7,WEEKDAY(C4)=1)

Note: it’s important that CF formulas be entered relative to the “active cell” in the selection, which is assumed to be C5 in this case.

Worked Example:   Highlight dates in the next N days in Excel

Once you save the rule, you’ll see all dates that are a Saturday or a Sunday highlighted by your rule.

Worked Example:   Managing Conditional Formatting Rules in Excel

How this formula works

This formula uses the WEEKDAY function to test dates for either a Saturday or Sunday. When given a date, WEEKDAY returns a number 1-7, for each day of the week. In it’s standard configuration, Saturday = 7 and Sunday = 1. By using the OR function, use WEEKDAY to test for either 1 or 7. If either is true, the formula will return TRUE and trigger the conditional formatting.

Worked Example:   Sum by weekday in Excel

Highlighting the entire row

If you want to highlight the entire row, apply the conditional formatting rule to all columns in the table and lock the date column:

=OR(WEEKDAY($C4)=7,WEEKDAY($C4)=1)

Post navigation

Previous Post:

VLOOKUP without #N/A error in Excel

Next Post:

How to Create Gantt Chart in Excel

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • How to use Excel TRUE Function
  • How to use Excel NOT Function
  • IF with wildcards in Excel
  • IFS function: Description, Usage, Syntax, Examples and Explanation
  • IF, AND, OR and NOT Functions Examples in Excel

Date Time

  • DAY function: Description, Usage, Syntax, Examples and Explanation
  • How to Calculate Age in Excel
  • How to calculate next day of week in Excel
  • Count holidays between two dates in Excel
  • Get month from date in Excel

Grouping

  • Group times into unequal buckets in Excel
  • If cell contains one of many things in Excel
  • Group times into 3 hour buckets in Excel
  • How to randomly assign people to groups in Excel
  • Running count group by n size in Excel

General

  • Spell Check in Excel
  • How to Insert Cells, Row and Rows in Excel
  • Excel Operators
  • Print Excel Sheet In Landscape Or Portrait
  • How to get Excel workbook path only
© 2023 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning