View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
FSt1 FSt1 is offline
external usenet poster
 
Posts: 3,942
Default Worksheet tabs to turn colors against criteria

hi
this should work. it assumes that the date in in A2. if not change that.
post back if you need help installing.
Private Sub Workbook_Open()
Dim sh As Worksheet
For Each sh In ActiveWorkbook.Sheets
If sh.Range("A2").Value < Now + 90 Then
sh.Tab.ColorIndex = 3
Else
If sh.Range("A2").Value Now + 90 And _
sh.Range("A2").Value < Now + 180 Then
sh.Tab.ColorIndex = 45
Else
If sh.Range("A2").Value Now + 180 Then
sh.Tab.ColorIndex = 4
End If
End If
End If
Next sh
End Sub

regards
FSt1

"Neall" wrote:

I want my sheet tabs to change color depending on the date. on the sheet

Example, each sheet represents a customer when the customer is yup for
renewal in less than 90 days to turn red, between 91 and 180 days turn orange
and beyond 180 days to turn green.

Can someone help me with this?

Neall