Date Format not playing nice with Conditional Formatting

DeaninGA

Board Regular
Joined
May 20, 2013
Messages
141
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
This Date Format "2021-03-01"comes out of a report we get from our ERP When I flip it into a pivot table and apply some basic conditional formatting based on the date it doesn't want to work. Whats the practical solution? Is there a way to either Reformat the date in my data table, or a way to tame Conditional formatting? My Conditional Formatting syntax is "=$G$2=TODAY()-1" for yesterday. I should Say that I have A format for yesterday, Today , 3 days in the future , and 10 days or greater in the future.


Thanks in advance
Dean
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Dave Patton

Well-known Member
Joined
Feb 15, 2002
Messages
4,654
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Coerce the text to be a real date. N.B. See the example below.
G2 is Text.

T202103a.xlsm
GHI
1info
22021-03-01FALSETRUE
301-03-21FALSETRUE
4
3c
Cell Formulas
RangeFormula
H2:H3H2=$G$2=TODAY()-1
I2I2=--G2<TODAY()
I3I3=G3<TODAY()
 

Dave Patton

Well-known Member
Joined
Feb 15, 2002
Messages
4,654
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Today is March 18. I edited your information for this post.

T202103a.xlsm
FGHIJ
2G2 Text2021-03-17FALSETRUETRUE
3G3 Number2021-03-17TRUETRUETRUE
1b
Cell Formulas
RangeFormula
H2H2=$G$2=TODAY()-1
I2:I3I2=--$G$2=TODAY()-1
J2:J3J2=G2+0=TODAY()-1
H3H3=G3=TODAY()-1
 

Watch MrExcel Video

Forum statistics

Threads
1,129,383
Messages
5,635,951
Members
416,889
Latest member
dhegs

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top