LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default help, simple question about variables


I am having a similar need. However, my spreadsheet is being driven by
a Query Table; with the exception of columns A thru D are formulas. So
when the query is refreshed usually the first few rows still end up
containing the formulas.

I am trying to write a macro that autofills by selecting A2:D2 and then
fills down to last possible row. This will vary every time the
spreadsheet is refreshed according the the criteria for the query. I
cannot specify the range as follows:
____________________________
Sub AutoFill()
'
' AutoFill Macro
' Macro recorded 8/9/2006 by dredden
'
' Keyboard Shortcut: Ctrl+q
'
Range("A2:D2").Select
Selection.AutoFill Destination:=Range("A2:D20")
Range("A2:D20").Select
End Sub

Is there some way to have the Destination look at Column E and the last
row in that column to stop there when that field is blank?

I could really use some help on this....I am a very basic to none user
in Macros. I'm trying to use a book, but it's not much help.


--
aka_krakur
------------------------------------------------------------------------
aka_krakur's Profile: http://www.excelforum.com/member.php...o&userid=36905
View this thread: http://www.excelforum.com/showthread...hreadid=337311

 
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
IF formula-simple question; simple operator Rich D Excel Discussion (Misc queries) 4 December 6th 07 03:36 PM
Simple Simple Excel usage question BookerW Excel Discussion (Misc queries) 1 June 23rd 05 10:06 PM
VBA question about Variables Sean Stuber Excel Programming 4 April 26th 04 03:44 PM
Variables - simple question Squid[_3_] Excel Programming 3 February 16th 04 09:48 AM
simple question, hopefully a simple answer! Matt B Excel Programming 5 January 13th 04 08:43 PM


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