View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Doug Glancy Doug Glancy is offline
external usenet poster
 
Posts: 770
Default working with multiple ranges

dreamz,

Sub Test()
Dim ws As Worksheet

For Each ws In Worksheets(Array("shDER", "shHum", "shTRI", "shOOS"))
ws.Range("C7:C368").Value =Range("LIST").Value
Next ws
End Sub

You should also qualify your from Range so that it looks somehting like:
Worksheet("Foo").Range("LIST").Value

hth,

Doug

"dreamz" wrote in
message ...

right now, i have something like this:


Code:
--------------------
shDER.Range("C7:C368").Value = Range("LIST").Value
shHum.Range("C7:C368").Value = Range("LIST").Value
shTRI.Range("C7:C368").Value = Range("LIST").Value
shOOS.Range("C7:C368").Value = Range("LIST").Value
--------------------


is there a more elegant way of doing this, perhaps all in one line? all
i'm doing is changing the sheet.

thanks.


--
dreamz
------------------------------------------------------------------------
dreamz's Profile:
http://www.excelforum.com/member.php...o&userid=26462
View this thread: http://www.excelforum.com/showthread...hreadid=532989