View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nigel[_2_] Nigel[_2_] is offline
external usenet poster
 
Posts: 735
Default Is there a better way to get Range of cells for entier worksheet ?

Use a named Range?

--

Regards,
Nigel




"Dan Thompson" wrote in message
...
I am wondering if there is a quick easy way to set a range for all the
cells
in a worksheet. for example..

Set X = Range("Sheet1")

I want to run a conditional statement on each cell in my work sheet
somthing
like ...

For each cel in (x) if cel.interiorcolor = 5 Then (run this code)

I would rather use somthing like Set X = Range("Sheet1") than have to
do something like

Set X = Range("Sheet1").cells(1,1) to (65536, 256)

Any thoughts please ?

Thanks Dan