'COUNTIF using multiple criteria

I have a formula here where in vba were the result should be something like this get userid = myid where status = paid (this is the logic of the code) But it doesn`t work.

UnclaimedOrder = Application.WorksheetFunction.CountIfs(Sheet9.Range("B:B"), .Cells(SelRow, "A"), Sheet9.Range("P:P"), "Unclaimed")


SelRow = ID
.Range(P:P) = status

But the result are still zero.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source