Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
G'Day LWM,
I'm new to this Excel newsgroup stuff but let me know if this helps you out. Firstly you will need to know what the range cell address is in the worksheet. For this example I am going to use the first worksheet and the entire column A:A. It is always a good idea to declare all your variables and objects explicitly in your code so try and use the following: Dim ws As Worksheet Dim X As Range Set ws = Worksheets(1) Set X = ws.[A:A] Hope this helps. You should now be able to loop through the range using the For Each Next statement. Cheers James "lwm" wrote in message ... I want to take the current range and assign it to a variable touse in additional functions. How do I assign the current range to a variable like X? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Range to VLOOKUP as a Variable (range in another file) | Excel Programming | |||
select range and put range address in variable | Excel Programming | |||
Macro to copy a specified range to a variable range | Excel Programming | |||
setting a range variable equal to the value of a string variable | Excel Programming | |||
Problem trying to us a range variable as an array variable | Excel Programming |