hi, i need coding in command button click event ... that .. to count how many numbers are present between 150 to 200 in column M .
hi, i need coding in command button click event ... that .. to count how many numbers are present between 150 to 200 in column M .
Hi, mubashar,
maybe like this avoiding a loop:
Ciao,![]()
With WorksheetFunction MsgBox .CountIf(Range("M:M"), ">149") - .CountIf(Range("M:M"), ">201") End With
Holger
Use Code-Tags for showing your code: [code] Your Code here [/code]
Please mark your question Solved if there has been offered a solution that works fine for you
Did you try the Count function?
By "count how many numbers", you mean how many cells containing numbers? or if a cell contains "4235" it is considered 4 numbers?
![]()
MsgBox Application.Count(Range("M150:M200"))
多么想要告诉你 我好喜欢你
in column M it contains random numbers , i need how many cells in column M have values in between 150 to 200, and how many cells have value inbetween 200 to 250 and so on
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks