LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Autofill macro question

Hi Guys,

I need some assistance with a macro. I need the macro to grab some formulas
from a static range of cells (B2 - G2) and paste that formula in a static
range (B4 - G4) and then I need it to autofill to the last empty row (the end
of this range is always changing or else I would use a static end range).
For example, today I might need it to fill all the way to B36 - G36 and
tomorrow I might need it to fill to B77 - G77. The end of the range is
determined by the column immediately preceeding the formulas. In my example
above A36 or A77.

A B C D E F G H
1 x formulas............
2 x fill formulas........
3 x fill formulas........
4
5
6 x end formula fill....
7
8
9

My current Macro:
lRow = Cells(Rows.Count, "AG").End(xlUp).Row
Range("AG4").AutoFill Destination:=Range("AG4:AM" & lRow)

Gives the following error:
AutoFill method of Range class failed.

Thanks as always for your help!!
Kelley

 
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
Macro Autofill Question Andrew Biafore Excel Programming 1 December 5th 07 05:14 PM
Autofill in VBA question CarlosAntenna Excel Programming 4 April 12th 07 08:48 PM
Autofill question darksides Excel Programming 1 August 16th 06 04:03 PM
Q. Autofill question: Can I autofill alpha characters like I can numbers? George[_22_] Excel Programming 5 August 7th 04 10:33 AM
AutoFill Question nkob[_2_] Excel Programming 2 November 14th 03 08:56 PM


All times are GMT +1. The time now is 05:05 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"