LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default Problem with Formula in VB Macro

If you mean the explanation of how to use .AutoFill, no it was not easier.
But if you mean using .AutoFill instead of a For-Next loop? ... well, try it
on a complex formula sometime. (Unless you just plain like typing!)

"Dave Patrick" wrote:

Seems it wasn't easier after all.

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Charlie" wrote:
|I should first explain that the AutoFill method only works starting from
the
| selected cell, i.e. if "M2" is where your formula is then you can only
| autofill up, down, left, or right from cell "M2".
|
| Example:
|
| Range("M2").Select
| Selection.AutoFill Destination:=Range("M2:M15"), Type:=xlFillDefault
|
| If you want to copy the formula in "M2" to "A5" (and beyond) you must
first
| copy the formula to "A5" and then autofill down the "A" column
|
| Range("A5").Formula = Range("M2").Formula
| Range("A5").Select
| Selection.AutoFill Destination:=Range( <put your range in here ),
| Type:=xlFillDefault
|
| and insert the fill range in the format "A5:A999" or Cells(5, "A"),
| Cells(999, "A") etc.
|
| I'll leave it to you to calculate the row range. I need to hit the road
for
| the day. Bye



 
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
Formula Problem in Macro [email protected] Excel Discussion (Misc queries) 2 April 4th 07 09:49 PM
Put a formula to a cell with macro and it doesent calculate. (Excel localisation problem?) [email protected] Excel Programming 1 April 20th 06 02:39 PM
Problem in updating all worksheets of a workbook using a macro that calls another macro [email protected] Excel Programming 3 March 20th 06 05:21 AM
Macro Formula Updating Problem Tim Excel Programming 0 June 8th 04 05:16 PM
Excel/macro Formula Problem! nic17 Excel Programming 5 June 3rd 04 06:22 PM


All times are GMT +1. The time now is 09:35 PM.

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"