Excel ยท ChatGPT

Conditional Formatting Based on Another Cell in Excel

Highlight rows from another cell, fix rules that use the wrong absolute reference, and combine status with due dates. These tested ChatGPT prompts focus on the reference logic that commonly breaks Excel Conditional Formatting.

Choose your situation โ€” copy the tested prompt:
I have an Excel table of customer invoices.

The data is in cells A2:E6:

Row 2 โ€” Acme Corp โ€” INV-1001 โ€” 05/08/2026 โ€” Paid โ€” 1200
Row 3 โ€” Beta Ltd โ€” INV-1002 โ€” 10/08/2026 โ€” Overdue โ€” 850
Row 4 โ€” Gamma Inc โ€” INV-1003 โ€” 28/08/2026 โ€” Open โ€” 2100
Row 5 โ€” Delta Services โ€” INV-1004 โ€” 15/08/2026 โ€” Overdue โ€” 675
Row 6 โ€” Northstar LLC โ€” INV-1005 โ€” 30/08/2026 โ€” Paid โ€” 1450

The worksheet columns are:

A = Customer
B = Invoice #
C = Due Date
D = Status
E = Amount

I want to use Excel Conditional Formatting to highlight the entire row from A:E whenever the Status in column D is exactly `Overdue`.

I do not want to add a helper column or change the source data.

Please answer in exactly these 6 sections:

1. Conditional Formatting formula โ€” Give me the exact formula.
2. Range to select โ€” Tell me exactly what range to select before creating the rule.
3. Why the reference is correct โ€” Explain why `$D2` is correct and briefly explain what would happen with `$D$2`, `D$2`, and `D2`.
4. Rows that should be highlighted โ€” List each sample row and state Yes or No.
5. What goes wrong with `$D$2` โ€” Explain exactly what would happen in this sample if the rule used `=$D$2="Overdue"`.
6. Exact Excel steps โ€” Give the exact steps using Home โ†’ Conditional Formatting โ†’ New Rule โ†’ Use a formula to determine which cells to format.

Formatting rules:
- Use exactly six numbered section headings, 1 through 6.
- Use plain text for formulas and ranges. Do not use code blocks.
- Do not use Markdown tables.
- In section 4, use one bullet point per row.
- In section 6, use bullet points only.
- Do not create nested numbered lists.
- Keep the answer concise and practical.
- Do not suggest helper columns.
- Do not modify the original data.

Use this when you want Excel to format the full A:E row while checking one Status cell in column D.

I have an Excel Conditional Formatting rule that is supposed to highlight the entire row when the Status is `Overdue`.

My data is in A2:E6:

Row 2 โ€” Acme Corp โ€” INV-1001 โ€” 05/08/2026 โ€” Overdue โ€” 1200
Row 3 โ€” Beta Ltd โ€” INV-1002 โ€” 10/08/2026 โ€” Paid โ€” 850
Row 4 โ€” Gamma Inc โ€” INV-1003 โ€” 12/08/2026 โ€” Overdue โ€” 2100
Row 5 โ€” Delta Services โ€” INV-1004 โ€” 15/08/2026 โ€” Open โ€” 675
Row 6 โ€” Northstar LLC โ€” INV-1005 โ€” 18/08/2026 โ€” Overdue โ€” 1450

The worksheet columns are:

A = Customer
B = Invoice #
C = Due Date
D = Status
E = Amount

The Conditional Formatting rule currently uses:

=$D$2="Overdue"

The rule applies to:

=$A$2:$E$6

Problem:

Excel is highlighting every row, even though only rows 2, 4, and 6 have `Overdue` in column D.

I want each row to be evaluated using its own Status cell.

Please answer in exactly these 6 sections:

1. Diagnosis โ€” Explain why the current rule highlights every row.
2. Correct formula โ€” Give the exact Conditional Formatting formula I should use instead.
3. Why the corrected reference works โ€” Explain the difference between `$D$2` and `$D2` in this specific rule.
4. Expected result โ€” List each sample row and state whether it should be highlighted after the fix.
5. How to fix the existing rule โ€” Explain how to edit the current Conditional Formatting rule without recreating the data or adding helper columns.
6. Quick reference check โ€” Briefly explain what `$D$2`, `$D2`, `D$2`, and `D2` would do when the rule is applied across A2:E6.

Formatting rules:
- Use exactly six numbered section headings, 1 through 6.
- Use plain text for formulas and ranges. Do not use code blocks.
- Do not use Markdown tables.
- In section 4, use one bullet point per row.
- In section 5, use bullet points only.
- Keep the answer concise and practical.
- Do not suggest helper columns.
- Do not modify the source data.

Use this when a rule highlights every row or only behaves correctly for the first row. The usual culprit is a locked row reference such as $D$2.

I have an Excel table of customer invoices.

The data is in A2:E7:

Row 2 โ€” Acme Corp โ€” INV-1001 โ€” 05/08/2026 โ€” Open โ€” 1200
Row 3 โ€” Beta Ltd โ€” INV-1002 โ€” 10/08/2026 โ€” Paid โ€” 850
Row 4 โ€” Gamma Inc โ€” INV-1003 โ€” 20/08/2026 โ€” Open โ€” 2100
Row 5 โ€” Delta Services โ€” INV-1004 โ€” 25/08/2026 โ€” Open โ€” 675
Row 6 โ€” Northstar LLC โ€” INV-1005 โ€” 15/08/2026 โ€” Overdue โ€” 1450
Row 7 โ€” Apex Partners โ€” INV-1006 โ€” 12/08/2026 โ€” Open โ€” 980

The worksheet columns are:

A = Customer
B = Invoice #
C = Due Date
D = Status
E = Amount

I want to use Excel Conditional Formatting to highlight the entire row from A:E only when BOTH of these conditions are true:

- Status in column D is exactly `Open`
- Due Date in column C is earlier than 23/08/2026

Do not treat a row with Status `Overdue` as a match, even if its Due Date is earlier than 23/08/2026.

I do not want to add helper columns or modify the source data.

Please answer in exactly these 6 sections:

1. Conditional Formatting formula โ€” Give me the exact formula.
2. Range to select โ€” Tell me exactly what range to select before creating the rule.
3. Why the formula works โ€” Explain how the two conditions are combined and why the references to columns C and D should lock the columns but leave the row relative.
4. Expected result โ€” List each sample row and state whether it should be highlighted.
5. Common mistakes โ€” Explain briefly what could go wrong if I use OR instead of AND, use `$C$2` and `$D$2`, or compare the date to the text `"23/08/2026"` instead of using a proper Excel date value.
6. Exact Excel steps โ€” Give the exact steps to create the rule using Home โ†’ Conditional Formatting โ†’ New Rule โ†’ Use a formula to determine which cells to format.

Formatting rules:
- Use exactly six numbered section headings, 1 through 6.
- Use plain text for formulas and ranges. Do not use code blocks.
- Do not use Markdown tables.
- In section 4, use one bullet point per row.
- In section 6, use bullet points only.
- Keep the answer concise and practical.
- Do not suggest helper columns.
- Do not modify the source data.

Use this when the row should be highlighted only if multiple conditions are true, such as an Open status plus a due date before a cutoff.

Before โ€” the condition lives in D, but the whole row needs formatting
RowCustomerDue DateStatusAmount
2Acme Corp05/08/2026Paid1200
3Beta Ltd10/08/2026Overdue850
4Gamma Inc28/08/2026Open2100
5Delta Services15/08/2026Overdue675
6Northstar LLC30/08/2026Paid1450
Goal: format A:E, but evaluate the Status in column D for each row.
After โ€” mixed reference checks each row correctly
RowCustomerStatusFormatting
2Acme CorpPaidNo
3Beta LtdOverdueHighlight A3:E3 โœ“
4Gamma IncOpenNo
5Delta ServicesOverdueHighlight A5:E5 โœ“
6Northstar LLCPaidNo
Verified ChatGPT result
Formula: =$D2="Overdue"
Applies to: =$A$2:$E$6

$D locks the Status column; the row stays relative.
Before โ€” $D$2 makes every row check the same cell
RowCustomerStatusResult with =$D$2="Overdue"
2Acme CorpOverdueHighlighted
3Beta LtdPaidHighlighted incorrectly
4Gamma IncOverdueHighlighted
5Delta ServicesOpenHighlighted incorrectly
6Northstar LLCOverdueHighlighted
Because D2 is Overdue, the locked formula returns TRUE for every row in the Applies to range.
After โ€” remove the $ from the row number
RowStatus checkedCorrect result
2D2 = OverdueHighlighted โœ“
3D3 = PaidNot highlighted
4D4 = OverdueHighlighted โœ“
5D5 = OpenNot highlighted
6D6 = OverdueHighlighted โœ“
Verified ChatGPT diagnosis
Wrong: =$D$2="Overdue"
Correct: =$D2="Overdue"

Keep column D fixed. Let the row change.
Before โ€” an early date alone is not enough
RowCustomerDue DateStatusEarly?
2Acme Corp05/08/2026OpenYes
3Beta Ltd10/08/2026PaidYes
4Gamma Inc20/08/2026OpenYes
5Delta Services25/08/2026OpenNo
6Northstar LLC15/08/2026OverdueYes
7Apex Partners12/08/2026OpenYes
Requirement: Status must be Open AND Due Date must be earlier than 23/08/2026.
After โ€” AND applies both tests to the same row
RowStatusDue DateResult
2Open05/08/2026Highlighted โœ“
3Paid10/08/2026Not highlighted
4Open20/08/2026Highlighted โœ“
5Open25/08/2026Not highlighted
6Overdue15/08/2026Not highlighted
7Open12/08/2026Highlighted โœ“
Verified ChatGPT result
=AND($D2="Open",$C2<DATE(2026,8,23))

Both conditions must be TRUE for the row to be highlighted.
Why Conditional Formatting based on another cell goes wrong โ€” 4 common causes
Row locked by mistake
$D$2 always checks row 2 โ†’ use $D2 when each row needs its own Status
Very common
Condition column can shift
D2 can move across columns A:E โ†’ lock the condition column as $D2
Reference issue
OR used instead of AND
Either condition becomes enough โ†’ use AND(...) when every test must be TRUE
Logic issue
Date entered as text
"23/08/2026" can depend on locale โ†’ use DATE(2026,8,23)
Date issue

How to Use Conditional Formatting Based on Another Cell with ChatGPT

Build and verify the rule โ€” 5 steps
1

Select the full range you want Excel to format

If the whole invoice row should change, select the full data range such as A2:E6, not only the Status cells. Keep the header row out of the Applies to range.

2

Write the formula from the first data row

Conditional Formatting formulas are evaluated relative to the top-left cell of the selected range. If your data starts on row 2, write the rule using row 2 references such as =$D2="Overdue".

3

Lock the condition column, not the row

Use $D2 when Excel must always check column D but move from row 2 to row 3, row 4, and so on. Using $D$2 makes every row check the same cell.

4

Use AND when multiple conditions must all match

For Status plus Due Date, combine the tests in one rule, for example =AND($D2="Open",$C2<DATE(2026,8,23)). This prevents an early date alone from triggering the format.

5

Verify both the formula and Applies to range

Open Conditional Formatting โ†’ Manage Rules and check the formula together with the range it applies to. A correct formula can still appear wrong if the Applies to range starts on a different row.

Reference rule: for whole-row formatting based on one condition column, the usual pattern is to lock the column and leave the row relative โ€” for example $D2, not $D$2.

Conditional Formatting Based on Another Cell โ€” FAQs

How do I use conditional formatting based on another cell in Excel?
Select the range you want to format, create a formula-based Conditional Formatting rule, and reference the condition cell with the correct relative or mixed reference. For example, =$D2="Overdue" can format A:E while checking column D for each row.
How do I highlight an entire row based on another cell in Excel?
Select the full row range to format, such as A2:E100, then use a formula that locks the condition column but leaves the row relative, such as =$D2="Overdue".
Why does conditional formatting highlight every row in Excel?
A common cause is locking the row in the formula. For example, =$D$2="Overdue" makes every row check D2. If D2 is Overdue, every row in the Applies to range can be highlighted.
What is the difference between $D2 and $D$2 in conditional formatting?
$D2 locks column D but lets the row change, so each row checks its own Status cell. $D$2 locks both column D and row 2, so every formatted row checks the same cell, D2.
Can Excel conditional formatting use multiple conditions and dates?
Yes. Use AND when every condition must be true. For example, =AND($D2="Open",$C2<DATE(2026,8,23)) highlights a row only when Status is Open and the Due Date is earlier than 23 August 2026.

Related Excel workflows