pratiksuhasaria
New Member
- Joined
- Mar 26, 2019
- Messages
- 24
this is the excel forumla which i used to calculate count of values which are less than and equal to E2
=COUNTIF(Sheet1!D2:D13,"<="&E2)
but i want this same thing to be used in vba so i used this function
Application.WorksheetFunction.CountIf(rng, Range("<=" & "E2"))
but it showing error of type mismatch
help me out with this
=COUNTIF(Sheet1!D2:D13,"<="&E2)
but i want this same thing to be used in vba so i used this function
Application.WorksheetFunction.CountIf(rng, Range("<=" & "E2"))
but it showing error of type mismatch
help me out with this