View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Conditional actions

In a macro, there is no need for the INDIRECT function.

Let's say that the row number you want to copy through is in cell A1. Then
use:
Range("B2:B" & Range("A1").Value).Copy

If it is a cell address in cell A1, then use:
Range("B2:" & Range("A1").Value).Copy

If it is a range address in cell A1, then use:
Range(Range("A1").Value).Copy

And quite likely, you can calculate the value without using the extra cell.
But your description lacks clues as to what you are doing.

HTH,
Bernie
MS Excel MVP


"Chris Manning" wrote in message
...
Hi,
What I am attempting to do is make a cut and paste in a macro with a
variable length that is determined by a number or adress listed in a cell.

Is
this possible using the INDIRECT reference?