View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Susan Susan is offline
external usenet poster
 
Posts: 1,117
Default return random value from visible cells

Dim x As Long

x = Int((ws1.Range("a1", ws1.Range("A1").End(xlDown)) _
.Cells.SpecialCells(xlCellTypeVisible).Count * Rnd) + 1)

this is *supposed* to return a random row out of the visible-only
cells. but it still comes up with the hidden rows. do i have the
SpecialCells designation in the wrong place?
many thanks in advance
:)
susan