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: 102
Default Autofill variable range

Hi,

I try to wright a command which autofills a range adjacent to information in
the cells left. So if Range A1:A300 contains data and I have a formule in cel
B1 I normally double click the fill-handle to copy (or autofill) the formula
down to cel B300 (which is adjacent to cel A300). The below statement helps
me manage to automatically autofill the range (B1:B300). My problem is that
range A can be variable, so this time it's up to cel A300, the following time
it's up to cel A500. How should i adjust the statement?!

Sub test()
'
' test Macro
' Macro recorded 19-03-2008 by dresses
'

'
Range("B1").Select
Selection.AutoFill Destination:=Range("B1:B316")
Range("B1:B316").Select
End Sub
 
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 variable lenght column w/ sequential numbers using VBA Billyruben Excel Discussion (Misc queries) 2 November 28th 08 01:29 AM
variable column numbers for autofill mattybinv Excel Programming 1 December 8th 05 01:06 PM
setting a range variable equal to the value of a string variable Pilgrim Excel Programming 2 July 1st 04 11:32 PM
Variable Autofill range Kate Excel Programming 2 February 23rd 04 09:20 PM
Variable Autofill Range Kate Excel Programming 1 February 23rd 04 09:12 PM


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