Dim ws As Worksheet, oneSheet as Worksheet
With ThisWorkbook
Set ws = .Worksheets("Summary")
ws.Range("A:A").ClearContents
ws.Range("A1:B1").Value = Array("Sheet Name", "Status")
For Each oneSheet in .Worksheets
if oneSheet.Name <> ws.Name Then
ws.Range("A1000").End(xlUp).Offset(0,1).Value = oneSheet.Name
End If
Next oneSheet
With ws
With Range(.Cells(2, 1), .Cells(.Rows.Count,1).End(xlup)).Offset(0, 1)
.FormulaR1C1 = "=CHOOSE(SIGN(COUNTIF(INDIRECT(RC1&""!B:B""),""SA""))+2*SIGN(COUNTIF(INDIRECT(RC1&""!B:B""),""TA"")) +1, ""neither"", ""SA"",""TA"", ""both"")"
End With
End With
End With
Bookmarks