Godders199
Active Member
- Joined
- Mar 2, 2017
- Messages
- 313
- Office Version
- 2013
Hello, I have the following formula which functions correctly, however i wanted to add an additional criteria which is causing an issue.
Cells(i, 20) = WorksheetFunction.CountIfs(ThisWorkbook.Sheets("Adviser data").Range("A:A"), Cells(i, 1), ThisWorkbook.Sheets("Adviser data").Range("d:d"), ">=" & Daterng2, ThisWorkbook.Sheets("Adviser data").Range("d:d"), "<=" & Daterng3, ThisWorkbook.Sheets("Adviser data").Range("n:n"), "Issue identified - Process", ThisWorkbook.Sheets("Adviser data").Range("o"), "q3")
the additional criteria was
ThisWorkbook.Sheets("homepage").Range("r1") <> "Q3")
So effectively i dont want it to count if Range (o) matches range r1
adding this to the end of the code just errors " unable to get th countifs property of the worksheet class"
can anyone help
Cells(i, 20) = WorksheetFunction.CountIfs(ThisWorkbook.Sheets("Adviser data").Range("A:A"), Cells(i, 1), ThisWorkbook.Sheets("Adviser data").Range("d:d"), ">=" & Daterng2, ThisWorkbook.Sheets("Adviser data").Range("d:d"), "<=" & Daterng3, ThisWorkbook.Sheets("Adviser data").Range("n:n"), "Issue identified - Process", ThisWorkbook.Sheets("Adviser data").Range("o"), "q3")
the additional criteria was
ThisWorkbook.Sheets("homepage").Range("r1") <> "Q3")
So effectively i dont want it to count if Range (o) matches range r1
adding this to the end of the code just errors " unable to get th countifs property of the worksheet class"
can anyone help