ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro: Copying Formula Help (https://www.excelbanter.com/excel-programming/340112-macro-copying-formula-help.html)

atxcomputers

Macro: Copying Formula Help
 

Hi,

Im looking to create a macro that will copy my formula in B1 to the
last reference in column A?

Column A's last refernce will vary from A2 to A8000 or more.

Basically if i manually copy the formula down it bogs my pc and so i
would really like the Macro to copy from B1 to B2, then once completed,
to then go down 1 line at a time untill it gets to the last text
reference in column A, hopefully this will speed up the process but i
dont know if or how to do.

So far, all ive managed is to copy to a specified cell i.e B200 but im
not good enough at the moment to do any more but really trying.


Range("B1").Select
Selection.AutoFill Destination:=Range("B1:B200"), Type:=xlFillDefault


Any Help Appriaciated?


--
atxcomputers
------------------------------------------------------------------------
atxcomputers's Profile: http://www.excelforum.com/member.php...o&userid=26852
View this thread: http://www.excelforum.com/showthread...hreadid=467696


Norman Jones

Macro: Copying Formula Help
 
Hi ATX,

Try:

Sub Tester()
Dim LRow As Long

LRow = Cells(Rows.Count, "A").End(xlUp)

Range("B1").AutoFill Destination:=Range("B1").Resize(LRow)
End Sub

---
Regards,
Norman



"atxcomputers"
wrote in message
news:atxcomputers.1vdfue_1126739125.2383@excelforu m-nospam.com...

Hi,

Im looking to create a macro that will copy my formula in B1 to the
last reference in column A?

Column A's last refernce will vary from A2 to A8000 or more.

Basically if i manually copy the formula down it bogs my pc and so i
would really like the Macro to copy from B1 to B2, then once completed,
to then go down 1 line at a time untill it gets to the last text
reference in column A, hopefully this will speed up the process but i
dont know if or how to do.

So far, all ive managed is to copy to a specified cell i.e B200 but im
not good enough at the moment to do any more but really trying.


Range("B1").Select
Selection.AutoFill Destination:=Range("B1:B200"), Type:=xlFillDefault


Any Help Appriaciated?


--
atxcomputers
------------------------------------------------------------------------
atxcomputers's Profile:
http://www.excelforum.com/member.php...o&userid=26852
View this thread: http://www.excelforum.com/showthread...hreadid=467696




Mike Fogleman

Macro: Copying Formula Help
 
Range("B1", Range("A1").End(xlDown)).Offset(0, 1).FillDown

What this says is take the formula that is in B1 and fill it down column B
until it reaches the last row with data in column A.

Mike F
"atxcomputers"
wrote in message
news:atxcomputers.1vdfue_1126739125.2383@excelforu m-nospam.com...

Hi,

Im looking to create a macro that will copy my formula in B1 to the
last reference in column A?

Column A's last refernce will vary from A2 to A8000 or more.

Basically if i manually copy the formula down it bogs my pc and so i
would really like the Macro to copy from B1 to B2, then once completed,
to then go down 1 line at a time untill it gets to the last text
reference in column A, hopefully this will speed up the process but i
dont know if or how to do.

So far, all ive managed is to copy to a specified cell i.e B200 but im
not good enough at the moment to do any more but really trying.


Range("B1").Select
Selection.AutoFill Destination:=Range("B1:B200"), Type:=xlFillDefault


Any Help Appriaciated?


--
atxcomputers
------------------------------------------------------------------------
atxcomputers's Profile:
http://www.excelforum.com/member.php...o&userid=26852
View this thread: http://www.excelforum.com/showthread...hreadid=467696





All times are GMT +1. The time now is 04:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com