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 - variable destination cells

Hi guys...

I have a macro that needs to:
1) Copy static range of formulas
2) navigate to first empty cell in row/column
3) Paste data in that empty cell
4) Autofill to end of data as determined by prior column.

Everything works great until I get to the autofill part. I think I must be
missing something obvious but I'm just STUCK!! Any thoughts you have would be
GREATLY appreciated. I have hunted around the message boards but not seeing
what I need. I can make this work if I am pasting the formulas into a static
range and then autofilling. The problem seems to be that my destination
range is different everytime. And so the macro needs to find the empty cell
(which I have working) and then autofill from there.

Range("AH2:AM2").Select
Selection.Copy
Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste
lRow = Cells(Rows.Count, "AG").End(xlUp).Row
Range("AH:AM")AutoFill Destination:=Range("AH:AM" & lRow)
 
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
Autofill Destination range open J.W. Aldridge Excel Programming 2 November 4th 08 12:34 AM
trouble shoot Selection.AutoFill Destination mario Excel Programming 1 May 15th 08 09:23 PM
How do I autofill combo boxes with their destination cell? Defoes Right Boot Excel Worksheet Functions 3 January 10th 05 12:49 PM
Autofill Destination poppy Excel Programming 5 August 2nd 04 02:03 PM


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

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

About Us

"It's about Microsoft Excel"