Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying a Macro Keepsmiling1228 Excel Discussion (Misc queries) 1 March 31st 08 05:31 PM
copying the Hyperlink function result without copying the actual formula mcheng Excel Worksheet Functions 2 June 9th 07 02:43 AM
Macro copying macro code TNSKHelp Excel Programming 1 June 17th 05 04:59 PM
Copying with a macro Markxxx Excel Discussion (Misc queries) 1 January 13th 05 09:56 AM
copying macro MarkS[_2_] Excel Programming 2 December 8th 03 01:34 AM


All times are GMT +1. The time now is 01:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"