Hi,
I have the following codes
de = 0
Sheets("Data").Activate
For i = 2 To LastRow
If InStr(1, CStr(Cells(i, 2).Value), quarter) <> 0 And InStr(1, CStr(Cells(i, 6).Value), "Detractor") And InStr(1, CStr(Cells(i, 13).Value), "Business") Then
de = de + 1
End If
Next i
Cells(9, 5).Value = de / x
de = 0
Sheets("Data").Activate
For i = 2 To LastRow
If InStr(1, CStr(Cells(i, 2).Value), quarter) <> 0 And InStr(1, CStr(Cells(i, 6).Value), "Detractor") And InStr(1, CStr(Cells(i, 13).Value), "IT Manger") Then
de = de + 1
End If
Next i
Cells(9, 5).Value = de / x
using the same code for other professionals also ("Business", "IT manager", "Student" etc.,)
Is there any way to pass the profession as arguments to avoid multiple lines of coding. I have around 25 professions list.
Please help
Bookmarks