Need simple macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All

In Excel 2002
Column A cells 1 to 20 has data in them, Column B1 has data in it,
I would like to have a macro that would copy the data from B1 to all the
cells to the right of the A Column cells even if there were 3 cells in
Column A or 50

Thanks In Advance

Graham
 
try
Sub copycola()
x = Cells(Rows.Count, "a").End(xlUp).Row
Range("b1:b" & x).FillDown
End Sub
 
No macro needed..........just highlight B1, and then double-click on the
little black square at the lower right corner of B1, when the cursor turns
to a black cross........it copies B1 down automatically as far as there is
data in column A

Vaya con Dios,
Chuck, CABGx3
 
Graham

Sub Auto_Fill()
Dim lrow As Long
With ActiveSheet
lrow = Range("A" & Rows.Count).End(xlUp).Row
Range("B1:B" & lrow).FillDown
End With
End Sub

Gord Dibben Excel MVP
 
Back
Top