I have the below code where the count of a cell gets updated based on a search from a specific column, specific text and specific worksheet.

How do I pass argument such that when it meets the condition, the count should be updated in the designated cell?

Currently thecodes just goes to the worksheet mentioned and scans a column for a specific string and if it matches, it will give the total count of the matched row in the designated cell. So I need to apply the same code to 30+ cells to perform this task (with diff strings as the search conditions in diff sheets). If the above code can be converted into hash with arguments (arguments being the sheet name, text to search,range to place the count, col to search) and when the arguments (the string here) meets the condition, the count should be updated in the designated cell.

Sub WBR()
Dim wf As WorksheetFunction
Set wf = Application.WorksheetFunction

With ActiveWorkbook.Worksheets("TT")                'no of tickets processed - summary
[AE43] = wf.CountIfs(.Range("I:I"), "<>Duplicate TT", _
                      .Range("G:G"), "<>Not Tested", _
                      .Range("U:U"), "Item")
 End With

With ActiveWorkbook.Worksheets("TT")                'not tested tickets - summary
[AE44] = wf.CountIfs(.Range("G:G"), "Not Tested")
End With

With ActiveWorkbook.Worksheets("TT")                'Tickets moved back- outdated OS and App Versions - summary
[AE45] = wf.CountIf(.Range("I:I"), "Outdated App Version") + wf.CountIf(.Range("I:I"), "Outdated OS")
End With