netrixuser
Board Regular
- Joined
- Jan 21, 2019
- Messages
- 77
- Office Version
- 365
- Platform
- Windows
Good morning.
To set the scene:
I have the following code copied down Column AF in the worksheet "Accsys Report" [Column AF isformatted as Date]
Column I in the Voxsmart Report worksheet contains dates
An example of the results of the Index/Match are:
One of the Dates above is more than 30 days "old" so I have a Conditional Format set to capture this: (it also applies to dates in Column AG, as per the screenshot)
My problem is that the format does not take place.
If I copy the date "30/08/2020 02:53:52" and "paste values" over the top it still does not work but if I just replace "30/08/2020 02:53:52" by manually typing "30th August 2020" the Conditional Format does change the cell background colour to orange.
I should point out that Conditional Formatting used to work but I cannot find out what broke it - there are no other Conditional Format rules in the spreadsheet and the conditional format code is virtually the last code in the Sub.
This is the Conditional Format Code - which is working in essence as it changes the background colour if I manually enter a date older that 30 days:
Many thanks in advance for any pointers
Regards
Netrixuser
To set the scene:
I have the following code copied down Column AF in the worksheet "Accsys Report" [Column AF isformatted as Date]
VBA Code:
=IFNA(IF(V2="yes",INDEX('VoxSmart Report'!I:I,MATCH(B2,'VoxSmart Report'!Y:Y,0)),"Not Recorded For WhatsApp"),"Problem!")
Column I in the Voxsmart Report worksheet contains dates
An example of the results of the Index/Match are:
One of the Dates above is more than 30 days "old" so I have a Conditional Format set to capture this: (it also applies to dates in Column AG, as per the screenshot)
My problem is that the format does not take place.
If I copy the date "30/08/2020 02:53:52" and "paste values" over the top it still does not work but if I just replace "30/08/2020 02:53:52" by manually typing "30th August 2020" the Conditional Format does change the cell background colour to orange.
I should point out that Conditional Formatting used to work but I cannot find out what broke it - there are no other Conditional Format rules in the spreadsheet and the conditional format code is virtually the last code in the Sub.
This is the Conditional Format Code - which is working in essence as it changes the background colour if I manually enter a date older that 30 days:
VBA Code:
Range("AF2:AG2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlLess, _
Formula1:="=NOW()-30"
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 49407
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = False
Many thanks in advance for any pointers
Regards
Netrixuser