VBA alternative
- test in attached workbook wih {CTRL} k
- sheet name AND value of cell A1 from each sheet (except excluded sheets) inserted in Sheet "ErrorCheck"
How it works
- array of excluded sheet names created
- all sheets looped looking for match in excuded array
- if match not found list is updated
Sub ListSheetValues()
Dim excl, n As String, s As Integer, NotIsInArray As Boolean, ws As Worksheet, cel As Range
Set ws = Sheets("ErrorCheck")
excl = Array("Summary", "ErrorCheck") 'sheets to exclude - in quote marks separated by comma
ws.Cells.Clear
ws.Range("A1:B1") = Array("SheetName", "Value of A1")
For s = 1 To ThisWorkbook.Sheets.Count
n = Sheets(s).Name
NotIsInArray = IsError(Application.Match(n, excl, 0))
If NotIsInArray Then
Set cel = ws.Range("A" & Rows.Count).End(xlUp).Offset(1)
cel = n
cel.Offset(, 1) = Sheets(s).Range("A1")
End If
Next s
End Sub
Bookmarks