View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Damon Longworth[_3_] Damon Longworth[_3_] is offline
external usenet poster
 
Posts: 23
Default copy one cell to range of cells

Try something similar to:

MyRow = ActiveCell.Row
MyCol = ActiveCell.Column - 1
Range(Cells(1, MyCol), Cells(MyRow, MyCol)) = "YourValueHere"


This can be done without moving the activecell, which is normally preferable.

"shoup" wrote:

I am new to using macros, and having trouble with the copy function. I need
to copy one cell's contents to a range of cells above it to cell location A1.
The range is determined by how many cells contain data in column B. I use
end-down to determine the number of cells in column B, and this can vary each
time I run the report. How can I move to left one cell to column A when I
find the bottom of column B, enter a value, and then copy this value up to
cell A1?

Any help is greatly appreciated. Thanks.