![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Christchurch New Zealand
Posts: 1,030
|
In my code I have
Selection.AutoFill Destination:=Range("E2:G1029") can I change that so it fills down to however many rows I have whether it be 1029 or 65000, because my data changes all the time? I can't think today. |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
|
Quote:
Try, lastrow = Cells(Rows.Count, "D").End(xlUp).Row Selection.AutoFill Destination:=Range("E2:G" & lastrow) Untested, but should work. Bye, Jay |
|
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Christchurch New Zealand
Posts: 1,030
|
Yeah that works great thanks
|
|
|
|
|
|
#4 |
|
New Member
Join Date: Apr 2002
Location: Centerville, Indiana
Posts: 14
|
Thanks Jay. I had a similar question but all the answers I found seemed too complicated for this rookie. Spent 1 1/2 hours trying to apply them. Took 5 minutes on this and it works great!
[ This Message was edited by: First Wob on 2002-04-09 18:16 ] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|