View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default VARIABLE IN EXCEL MACRO

set rng = Range("B9").Resize(20,5)
msgbox rng.Address
rng.Select

--
Regards,
Tom Ogilvy

"Ulrik loves horses" wrote in
message ...
Partially, I also expected the answer to give a solution for selecting a
specific part of a block like from a certain cell to 2O lines below and/or
5
colums to the right.

"Stopher" wrote:


Ulrik loves horses wrote:

Try to copy various data from various places to another sheet using
Excel
Macro, as this is required on a weekly basis.
However the data which needs copied is always in blocks, but the number
of
Lines as well as the number of columns is changing.
Will need to take variable selection criteria in Excel macro as this is
possible in Excel.

Go to a certain cell
select an array using <End Left <End Down functions.
How would you translate these instructions in a Macro?


What about:

' Go to a certain cell
Range ("A1"). select

' Select the current block of data

Selection.CurrentRegion.Select

Does this help any??