View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Acid-Sky[_2_] Acid-Sky[_2_] is offline
external usenet poster
 
Posts: 1
Default Object Type of a selection... counting rows in a selection


I have the following code:


Code
-------------------

Dim numPet As Integer
Dim sel ' what kind of object is this... so i can use count... "range", "application.selection" don't work

Worksheets("Datos").Activate
sel = Excel.Range("A4", Excel.Range("A4").End(xlDown)).Select

numPet = sel.Rows.Count

-------------------


and I need to count the number of rows selected. as there will be n
blank cells
counting like this should be fine. but i don't know what kind of objec
"sel" needs to be.

btw. any idea on how to apply a filter (select only cell containing
certain string) on the selection

--
Acid-Sk
-----------------------------------------------------------------------
Acid-Sky's Profile: http://www.excelforum.com/member.php...fo&userid=2650
View this thread: http://www.excelforum.com/showthread.php?threadid=39806