View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default Input Color Scheme for Date Column

Sub colr()
If Now - ActiveCell.Value 30 Then
ActiveCell.Interior.ColorIndex = 3
ElseIf ActiveCell.Value Now Then
ActiveCell.Interior.ColorIndex = 10
End If
End Sub


"Beep Beep" wrote:

I have a column in Excel that has only dates inputed. I would like to wright
a macro that would look at the dates and do the following:

If the date is older than 30 days from the current date then make the active
cell color Red

If the date is greater than the current date then make the active cell green

Thanks
Frank