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

Data Analysis

  • Data Series in Excel
  • How to create a Histogram in Excel
  • How to Sort by Color in Excel
  • Move chart to a separate worksheet in Excel
  • Get column name from index in Excel Table

References

  • VLOOKUP function: Description, Usage, Syntax, Examples and Explanation
  • Get nth match with INDEX / MATCH in Excel
  • Find Closest Match in Excel Using INDEX, MATCH, ABS and MIN functions
  • How to get last row in numeric data in Excel
  • Complete List of Excel Lookup and Reference Functions, References and Examples

Data Validations

  • Prevent invalid data entering in specific cells
  • Excel Data validation date in next 30 days
  • Excel Data validation must contain specific text
  • Excel Data validation unique values only
  • Excel Data validation no punctuation

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.

Worked Example:   Highlight rows that contain in Excel

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.

Worked Example:   Highlight duplicate values in Excel

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:

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

  • Excel If, Nested If, And/Or Criteria Examples
  • IFNA function: Description, Usage, Syntax, Examples and Explanation
  • SWITCH function: Description, Usage, Syntax, Examples and Explanation
  • IF function: Description, Usage, Syntax, Examples and Explanation
  • How to return blank in place of #DIV/0! error in Excel

Date Time

  • How to calculate months between dates in Excel
  • How to calculate nth day of week in month in Excel
  • How to get Weekdays, Working days between Two Dates in Excel
  • Convert date to Julian format in Excel
  • Display Date is workday in Excel

Grouping

  • How to randomly assign data to groups in Excel
  • If cell contains one of many things in Excel
  • Map text to numbers in Excel
  • How to randomly assign people to groups in Excel
  • Group times into unequal buckets in Excel

General

  • How to add sequential row numbers to a set of data in Excel
  • Count cells that do not contain many strings in Excel
  • Count cells less than in Excel
  • Delete Blank Rows at Once in Excel
  • How to calculate total from percentage in Excel
© 2023 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning