Hello,
I'm having some trouble getting a Conditional Formatting Rule to work using the INDIRECT function.
I'm using a formula within the Table for testing in column 'C'.
Column 'E' - outside the Table - was converted to use the INDIRECT function to work from outside the Table.
Columns A:B are formatted as Dates.
Both formulas produce the same results correctly, but using the formula in 'E' is not conditionally formatting the dates in 'A' that are greater than it's corresponding 'Due Date' in column 'B'.
I avoid using cell references when I can as my Table data may shift at times. Using INDIRECT prevents the formula from breaking if a new column is added or rearranged within the Table.
Any help on this would be greatly appreciated.
I'm having some trouble getting a Conditional Formatting Rule to work using the INDIRECT function.
I'm using a formula within the Table for testing in column 'C'.
Column 'E' - outside the Table - was converted to use the INDIRECT function to work from outside the Table.
Columns A:B are formatted as Dates.
Both formulas produce the same results correctly, but using the formula in 'E' is not conditionally formatting the dates in 'A' that are greater than it's corresponding 'Due Date' in column 'B'.
I avoid using cell references when I can as my Table data may shift at times. Using INDIRECT prevents the formula from breaking if a new column is added or rearranged within the Table.
Any help on this would be greatly appreciated.
VBA Testing.xlsm | |||||||
---|---|---|---|---|---|---|---|
A | B | C | D | E | |||
1 | CF Applied to: | Formula | CF Rule using INDIRECT | ||||
2 | Test Date | Due Date | IF Test > Due | ||||
3 | 22-Jan | 30-Jan | FALSE | ||||
4 | 31-Jan | 30-Jan | Overdue | TRUE | |||
5 | 24-Jan | 30-Jan | FALSE | ||||
6 | 25-Jan | 30-Jan | FALSE | ||||
7 | 26-Jan | 30-Jan | FALSE | ||||
Indirect-Dates |
Cell Formulas | ||
---|---|---|
Range | Formula | |
E3:E7 | E3 | =IF(ISNUMBER(INDIRECT("t_Indirect[Test Date]")),INDIRECT("t_Indirect[Test Date]") > INDIRECT("t_Indirect[Due Date]"),"") |
C3:C7 | C3 | =IF(ISNUMBER([@[Test Date]]),IF([@[Test Date]] > [@[Due Date]],"Overdue",""),"") |
Dynamic array formulas. |
Cells with Conditional Formatting | ||||
---|---|---|---|---|
Cell | Condition | Cell Format | Stop If True | |
A3:A7 | Expression | =IF(ISNUMBER(INDIRECT("t_Indirect[Test Date]")),INDIRECT("t_Indirect[Test Date]") > INDIRECT("t_Indirect[Due Date]"),"") | text | NO |