View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Jean-Yves[_2_] Jean-Yves[_2_] is offline
external usenet poster
 
Posts: 253
Default How to specify a range?

Voila,
Worksheets(rt).range("A2").End(xlDown).Offset(1,0)
Regards
JY

"Damien McBain" wrote in message
...
Jean-Yves wrote:

In : For Each rt In Worksheets("Data").Range("A2",
Range("A2").End(xlDown))
Worksheets("Data").Range("A2" : Refer to A2 on Worksheets("Data")
Range("A2").End(xlDown) Refer to all cell in column A on the active
sheet,.
ie new wk RT

Therfor you have to repeat the sheet name :
Worksheets("Data").Range("A2",
Worksheets("Data").Range("A2").End(xlDown))
Regards
JY


Cheers JY, thanks to you that part of the code is working now. The bit I'm
having trouble with now is pasting into the new sheet. I need to paste
into
the first empty cell in column A.

Would you mind filling in the blanks here?:

Worksheets(rt).<the first empty cell in column a.Paste

thanks again,

Damien