Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- https://excel-egy.com/forum/t3932
- ---------------------------------
- Sub Loop_Through_Range_Columns_Using_COUNTIFS()
- Dim rng As Range, c As Integer, n As Integer
- Application.ScreenUpdating = False
- Set rng = Range("I1:V3")
- For c = 1 To rng.Columns.Count Step 5
- For n = 1 To 4
- Cells(3, c + n + 7).Formula = "=COUNTIFS($F:$F," & Cells(2, c + n + 7).Address & ",$E:$E," & Cells(1, c + 8).Address & ")"
- Cells(3, c + n + 7).Value = Cells(3, c + n + 7).Value
- Next n
- Next c
- Application.ScreenUpdating = True
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement