Highlight cell if the finish date of a task is less than x days
Closed
v022695
Posts
1
Registration date
Wednesday April 9, 2014
Status
Member
Last seen
April 9, 2014
-
Apr 9, 2014 at 07:57 AM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Apr 10, 2014 at 07:54 AM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Apr 10, 2014 at 07:54 AM
Related:
- Highlight cell if the finish date of a task is less than x days
- Tiny task - Download - Mouse and keyboard
- Skype last seen days ago - Guide
- Move files older than x days windows - Guide
- Add 90 days to a date - Guide
- If cell contains date then return value ✓ - Office Software Forum
1 response
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Apr 10, 2014 at 07:54 AM
Apr 10, 2014 at 07:54 AM
suppose data is like this (column a blank except for header =beg date)
beg date end date
13-Apr
14-Apr
15-Apr
16-Apr
17-Apr
18-Apr
19-Apr
20-Apr
try this macro
beg date end date
13-Apr
14-Apr
15-Apr
16-Apr
17-Apr
18-Apr
19-Apr
20-Apr
try this macro
Sub test()
Dim r As Range, c As Range, x As Integer
x = 6 ' CHANGE THIS IF NECESSARY
Set r = Range(Range("B2"), Range("B2").End(xlDown))
r.Cells.Interior.ColorIndex = xlNone
For Each c In r
If c - CDate(Date) < x Then c.Interior.ColorIndex = 6
Next c
End Sub