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 1864 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Apr 10, 2014 at 07:54 AM
venkat1926 Posts 1864 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
- Highlight cell if another cell contains text ✓ - Excel Forum
- If cell contains (multiple text criteria) then return (corresponding text criteria) ✓ - Excel Forum
- Excel if cell is date ✓ - Office Software Forum
- Move files older than x days windows - Guide
- Excel conditional formatting if another cell contains specific text ✓ - Excel Forum
1 reply
venkat1926
Posts
1864
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
810
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