Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Referencing range in another worksheet

On Dec 11, 9:46*pm, Dave Peterson wrote:
dim AllCells as range
with worksheets("Data")
* set allcells = .range("a2",.cells(.rows.count,"A").end(xlup))
end with

msgbox allcells.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))


--

Dave Peterson


Yes, that worked - Thank you all
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Referencing a named range based upon Range name entry in cell Barb Reinhardt Excel Worksheet Functions 14 June 20th 07 07:19 PM
CountIF() in Worksheet B while referencing cells in Worksheet A jfj3rd Excel Worksheet Functions 3 April 14th 06 11:24 PM
CountIF() in Worksheet B while referencing cells in Worksheet A jfj3rd Excel Worksheet Functions 3 April 14th 06 07:36 PM
Range error when referencing non active worksheet SP[_5_] Excel Programming 7 October 29th 05 07:07 PM
range referencing lakey13[_3_] Excel Programming 1 November 5th 04 10:46 PM


All times are GMT +1. The time now is 04:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"