There are multiple flaws in your functions. One I will correct, one I will not (maybe you meant it to occur). You cannot utilize the countif function on multiple ranges like you have. I corrected it by using the sum function combined with 2 countif functions.
Your column C function (when used correctly)
=COUNTIFS('UD 2023'!D:D,"needs spacer",'UD 2023'!C:C,"")
Will count all blank cells in column C for the whole entire worksheet. I think this is a flaw but I could be wrong.
Try:
Sub PickMe()
Dim sumsht As Worksheet: Set sumsht = Sheets("Summary")
Dim ws As Worksheet
Dim LR As Long
Application.ScreenUpdating = False
For Each ws In Worksheets
LR = sumsht.Range("A" & Rows.Count).End(xlUp).Row
If Not ws.Name = "Summary" Then
sumsht.Range("A" & LR + 1).Value = ws.Name
sumsht.Range("B" & LR + 1).Formula = _
"=SUM(COUNTIF('" & ws.Name & "'!D:D, ""needs spacer""), COUNTIF('" & ws.Name & "'!C:C, "">=1""))"
sumsht.Range("C" & LR + 1).Formula = _
"=SUM(COUNTIF('" & ws.Name & "'!D:D, ""needs spacer""), COUNTIF('" & ws.Name & "'!C:C, """"))"
sumsht.Range("D" & LR + 1).Formula = _
"=COUNTIFS('" & ws.Name & "'!B:B, ""yes"")"
End If
Next ws
Application.ScreenUpdating = True
End Sub
Bookmarks