Sub InceptionDifference()
Dim LastRow As Long
Dim LastColumn As Integer
Dim id As Range
Dim sht As Worksheet
Dim i As Long
Dim r As Range
For i = 1 To ThisWorkbook.Worksheets.Count
Worksheets(i).Activate
Set r = Nothing
Set id = Nothing
If WorksheetFunction.CountA(Cells) > 0 Then
LastRow = Cells.Find(What:="*", After:=[A1], SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
LastColumn = Cells.Find(What:="*", After:=[A1], SearchOrder:=xlByColumns, SearchDirection:=xlPrevious).Column
Set r = Range(Cells(1, 1), Cells(LastRow, LastColumn))
Set id = r.Find(What:="inception difference", After:=[A1], SearchOrder:=xlByRows, SearchDirection:=xlPrevious)
Dim idLastRow As Long
Dim idFirstRow As Long
Dim r2 As Range
Set r2 = Nothing
If id.Value <> "" Then
If id.Offset(1, 0) <> "" Then
idFirstRow = id.Offset(1, 0).Row
idLastRow = id.End(xlDown).Row
Else
idFirstRow = id.End(xlDown).Row
idLastRow = id.End(xlDown).End(xlDown).Row
End If
Set r2 = Range(Cells(idFirstRow, id.Column), Cells(idLastRow, id.Column))
If Application.CountIf(r2, "<0") = r2.Count Then
ActiveWorkbook.Sheets(i).Tab.Color = 255
Else
If Application.CountIf(r2, ">0") = r2.Count Then
ActiveWorkbook.Sheets(i).Tab.Color = 5287936
Else
ActiveWorkbook.Sheets(i).Tab.Color = 65535
End If
End If
End If
End If
Next i
End Sub