Countif using vba
Dim r
r = 2
If Cells(r, 1) = "Marcus" And Cells(r, 2) = "Pink" Then
MsgBox Application.CountIf(Range("A2:AB2"), "0")
End If
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Mr M Walker" wrote in message
...
Is it possible to write a "if command" which performs a countif 0 if a
certain criteria is meet. i.e
r= 2
If cells (r,1) = "Marcus" and cells (r,2) = "Pink" then
countif("A2:AB2"0)
end if
I have tried using the fucntion commande with little success
I need to run this code through 10,000 record on a regural basis, it will
alsways countif the same range, however the row will obviously change.
Many thanks in anticipation
Macus
|