Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default variable row on fill?

Range("A3").Select
Selection.End(xlDown).Select
Row = ActiveCell.Row

Range("M4:W4").Select
Selection.AutoFill Destination:=Range("m4:E" & Row)
Range("m4:E" & Row).Select

The auto fill line doesn't work any thoughts are appreciated. thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,069
Default variable row on fill?

Please see Bob Phillips' response to your identical post from yesterday. If
you check the VBA help on AutoFill, it says the destination range must
include the source range. In other words, you have to autofill to the same
column(s) and include the source range, just as if you were autofilling the
range manually. My suggestion is that you first copy or move the source range
to e4:m4, then autofill down from there. However, your current source range
(M4:W4) includes 11 columns, but your destination range only includes 9
columns.

Hope this helps,

Hutch

"John" wrote:

Range("A3").Select
Selection.End(xlDown).Select
Row = ActiveCell.Row

Range("M4:W4").Select
Selection.AutoFill Destination:=Range("m4:E" & Row)
Range("m4:E" & Row).Select

The auto fill line doesn't work any thoughts are appreciated. thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default variable row on fill?

thanks tom, my internet timed out yesterday and I didn't see the post. thanks

"Tom Hutchins" wrote:

Please see Bob Phillips' response to your identical post from yesterday. If
you check the VBA help on AutoFill, it says the destination range must
include the source range. In other words, you have to autofill to the same
column(s) and include the source range, just as if you were autofilling the
range manually. My suggestion is that you first copy or move the source range
to e4:m4, then autofill down from there. However, your current source range
(M4:W4) includes 11 columns, but your destination range only includes 9
columns.

Hope this helps,

Hutch

"John" wrote:

Range("A3").Select
Selection.End(xlDown).Select
Row = ActiveCell.Row

Range("M4:W4").Select
Selection.AutoFill Destination:=Range("m4:E" & Row)
Range("m4:E" & Row).Select

The auto fill line doesn't work any thoughts are appreciated. thanks

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
How fill series containing one variable and one fixed value in XL nomad Excel Discussion (Misc queries) 2 September 18th 09 09:25 PM
variable paste or fill range [email protected] Excel Programming 5 October 6th 06 05:04 PM
Fill Down to variable row Sean Excel Programming 1 June 16th 05 09:55 PM
Fill a listbox with data from variable range Al Excel Programming 2 August 10th 04 07:05 AM
Passing Row variable to row Auto fill logic ExcelMonkey[_148_] Excel Programming 4 June 11th 04 10:48 PM


All times are GMT +1. The time now is 01:05 AM.

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"