Hi,

I have an excel workbook containing more than 100 sheets. Each sheet contains a similar template and has details about different customers.

I need the tab colour to change from the default colour based on values in different cells.

For Example,
Condition 1. If Cell F3 contains data the the tab colour should be Red.
Condition 2. If Cell F3 and Cell F8 contains data then the tab colour should be Green.

If both the cells are empty, then default tab colour.

I tried using VB Code, but was successful in using only one condition. Need assistance in using both the above conditions. The code I have used is

Private Sub Worksheet_Change(ByVal Target As Range)
If Range("F8").Value <> 0 Then
Me.Tab.ColorIndex = 10
Else
Me.Tab.ColorIndex = xlColorIndexNone
End If
End Sub

Thanks in advance.
Subash