View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default Referencing range in another worksheet

If that throws an error then try this:

Set AllCells = Worksheets("Data").Range("a2:" & Cells(Rows.Count,
"a").End(xlUp).Address)


"gtslabs" wrote:

I am trying to reference all the values in in column A in a different
worksheet.
I get errors using this. Please advise on the correct syntax.

Set AllCells = Worksheets("Data").Range("a2", Cells(Rows.Count,
"a").End(xlUp))