View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default How do I specify certain column to count rows in it?

this will find the last cell in col M with data
Sub countm()
MsgBox Cells(Rows.Count, "M").End(xlUp).Row
End Sub

--
Don Guillett
SalesAid Software

"VK" wrote in message
...
Hi, all!
There is an option in Excel to count all used rows in active sheet:
ActiveSheet.UsedRange.Rows.Count

I would like to count rows in one column, that is shorter then other.
How do I specify certain column to count? Something like:

Columns("M:M").UsedRange.Rows.Count

Reg. VK