#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Autofill

I have a formula that I want to have filled down starting from A2.
Everytime this macro would run, number of rows that would be filled would be
different.

Anyway to have this automated using vba?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 364
Default Autofill

you didn't mention what column the last row of data was, so i used B

Option Explicit
Dim lrow As Long
Sub fill()
lrow = Range("B1").End(xlDown).End(xlDown).Row
Range("A2").AutoFill Destination:=Range("A2:A" & lrow)
End Sub
--


Gary


"Dominique Feteau" wrote in message
...
I have a formula that I want to have filled down starting from A2.
Everytime this macro would run, number of rows that would be filled would
be different.

Anyway to have this automated using vba?



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
Autofill Greg Excel Discussion (Misc queries) 2 November 2nd 06 01:03 AM
Autofill Danny Lewis Excel Discussion (Misc queries) 1 August 28th 06 02:16 PM
Autofill sisco98 Excel Worksheet Functions 1 June 28th 05 01:30 PM
Autofill: Need to autofill one week block, (5) weekday only into cells. dstock Excel Discussion (Misc queries) 1 June 17th 05 08:21 PM
Q. Autofill question: Can I autofill alpha characters like I can numbers? George[_22_] Excel Programming 5 August 7th 04 10:33 AM


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