fill cells

  • Thread starter Thread starter Randy F
  • Start date Start date
R

Randy F

How can i select the cells in column to the right of my
other data so i can fill with the city name? i want to
fill all 3 cells or sometimes up to 20 cells. I have a
macro that will copy to the top and bottom cell, but not
the ones in the middle.

My Data:
Joseph 2 7. Eugene
Don S. 1 8
Robert 14 104.

My Macro:
ActiveWindow.ActivateNext 'change to ws where data
Sheets("Eugene").Select 'select correct ws
Range("A31").Select
ActiveSheet.UsedRange.Select
Application.CutCopyMode = False

selection.Copy
Windows("EngActivityNames22").Activate ' go back to
Range"A2").Select
ActiveSheet.Paste
Range("c2").Select

ActiveSheet.UsedRange.Select
Range("c2").End(xlToRight).Select
ActiveCell.Value = "Eugene"
Range("c2").End(xlDown).Select
ActiveCell.Offset(rowOffset:=0, columnOffset:=1).Activate
ActiveCell.Value = "Eugene"
 
Sub copytocol()'NO selecting involved
x = ActiveCell.Row
y = Cells(x, "IV").End(xlToLeft).Column + 1
Range(Cells(x, 1), Cells(x, y)).Value = "Eugene"
End Sub
 
Back
Top