Macro Copying to a cell referenced by a string in a cell


Posted by Mark on October 15, 2001 4:50 PM

In a macro - I need to copy a range of cells to another page. The place to copy the cells to is variable and available as a string on the worksheet. I need to control when this happens so I am trying to do this in a macro. Any help?



Posted by Jonathan on October 15, 2001 5:51 PM

You say the range is available as a string on the worksheet. Dump the string into a variable.

Dim strX as String
strX = Range("A20").Value
Range("C3:E5").Copy Range(strX)

I had cell A20 contained just this:

A20:C22

You get the idea, right? Is that what you were after?