Need simple macro

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
 
D

Don Guillett

try
Sub copycola()
x = Cells(Rows.Count, "a").End(xlUp).Row
Range("b1:b" & x).FillDown
End Sub
 
C

CLR

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
 
G

Gord Dibben

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top