View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
keepITcool keepITcool is offline
external usenet poster
 
Posts: 2,253
Default Selection of non-empty cells


William,

your code will throw an error
if constants OR formulas OR both are are not found.

i've posted one with a few more checks :)

--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


William wrote :

Hi Adrian

Sub test()
Dim r As Range
Set r = Union(Cells.SpecialCells(xlCellTypeConstants, 23), _
Cells.SpecialCells(xlCellTypeFormulas, 23))
r.Select
End Sub