A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Need simple macro



 
 
Thread Tools Display Modes
  #1  
Old June 6th, 2004, 05:03 PM
external usenet poster
 
Posts: n/a
Default Need simple macro

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


  #2  
Old June 6th, 2004, 05:55 PM
Don Guillett
external usenet poster
 
Posts: n/a
Default Need simple macro

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


--
Don Guillett
SalesAid Software

wrote in message
...
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




  #3  
Old June 6th, 2004, 06:01 PM
CLR
external usenet poster
 
Posts: n/a
Default Need simple macro

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





wrote in message
...
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




  #4  
Old June 6th, 2004, 06:04 PM
Gord Dibben
external usenet poster
 
Posts: n/a
Default Need simple macro

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

On Sun, 6 Jun 2004 17:03:21 +0100, wrote:

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


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:20 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.