Hi
I need some help with a macro that will count the amount of cells in column "b" that the cells containment is greater than 5
thanks
Hi
I need some help with a macro that will count the amount of cells in column "b" that the cells containment is greater than 5
thanks
Try either:
Hope that helps,Sub exa() MsgBox Evaluate("=COUNTIF(Sheet1!B:B,"">5"")") MsgBox WorksheetFunction.CountIf(Sheet1.Range("B:B"), ">5") End Sub
Mark
hi
thanks it works fine
i wanted to ask if i want to replace "5" with a variable
what should i do
thanks
[vba]
MsgBox Application.CountIf(Sheet1.Range("B:B"), ">" & myVar)
[/vba]
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber