View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default very simple question need to count number of rows

run this macro:

Sub rowcount()
MsgBox (Selection.Rows.Count)
End Sub

--
Gary''s Student - gsnu2007j


"sammy" wrote:

In a xl sheet I just need to count the number of rows

eg highlight and be advised there are 5 rows

hfhfdhfd
hfdhdf
gfgfg
hdfhfdh
djfdjfdj



Now I use the summation to add up the contents of say simple numbers but I
would just like to highlight a range of cells or rows and just have a
simple way of knowing how many rows there are.

Which ever is the simplest method.

Thanks in advance

Sammy