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

Data Analysis

  • Conditional Formatting Rules in Excel
  • Reverse List in Excel
  • How to sum a total in multiple Excel tables
  • How to add Trendline to a chart in Excel
  • Excel Frequency Function Example

References

  • LOOKUP function: Description, Usage, Syntax, Examples and Explanation
  • CHOOSE function: Description, Usage, Syntax, Examples and Explanation
  • How to get last row in numeric data in Excel
  • Count unique text values with criteria
  • How to get first row number in range in Excel

Data Validations

  • Excel Data validation date in next 30 days
  • Excel Data validation whole percentage only
  • Excel Data validation number multiple 100
  • Excel Data validation no punctuation
  • How To Create Drop-down List in Excel

Conditional formatting gantt chart in Excel

by

This tutorial shows how to work Conditional formatting gantt chart in Excel  using the example below;

Formula

=AND(date>=start,date<=end)

Explanation

To build a Gantt chart, you can use Conditional Formatting with a formula based on the AND function. In the example shown, the formula applied to D5 is:

=AND(D$4>=$B5,D$4<=$C5)

How this formula works

The trick with this approach is the calendar header (row 4), which is just a series of valid dates, formatted with the custom number format “d”.  With a static date in D4, you can use =D4+1 to populate the calendar. This makes it easy to set up a conditional formatting rule that compares the date associated with each column with the dates in columns B and C.

The formula is based on the AND function, configured with two conditions. The first conditions checks to see if the column date is greater than or equal to the start date:

D$4>=$B5

The second condition checks that the column date is less than or equal to the end date:

D$4<=$C5

When both conditions return true, the formula returns TRUE, triggering the blue fill for the cells in the calendar grid.

Note: both conditions use mixed references to ensure that the references update correctly as conditional formatting is applied to the calendar grid.

Post navigation

Previous Post:

COSH function: Description, Usage, Syntax, Examples and Explanation

Next Post:

Excel Data validation require unique number

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 IFS function in Excel
  • IF, AND, OR and NOT Functions Examples in Excel
  • IF with boolean logic in Excel
  • IFERROR function: Description, Usage, Syntax, Examples and Explanation
  • IFS function: Description, Usage, Syntax, Examples and Explanation

Date Time

  • Display Days in month in Excel
  • Calculate total hours that fall between two times in Excel
  • How to determine year is a leap year in Excel
  • Get days, hours, and minutes between dates in Excel
  • TIMEVALUE function: Description, Usage, Syntax, Examples and Explanation

Grouping

  • Running count group by n size in Excel
  • Group times into 3 hour buckets in Excel
  • Map inputs to arbitrary values in Excel
  • How to randomly assign people to groups in Excel
  • Calculate conditional mode with criteria in Excel

General

  • How to get original price from percentage discount in Excel
  • How to fill cell ranges with random number from fixed set of options in Excel
  • How to create dynamic worksheet reference in Excel
  • Common Errors in Excel
  • Flash Fill in Excel
© 2025 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning