Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default AutoFill columns

Is there a way I can specify a starting column and number of columns in the
following statement:

Selection.AutoFill Destination:=Columns("D:H"), Type:=xlFillDefault

Starting column is D
Number of colums?



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default AutoFill columns

NumColumns = 5
Selection.AutoFill Destination:=Columns("D:D").Resize(,NumColumns),
Type:=xlFillDefault

--
Regards,
Tom Ogilvy

"Charlie" wrote in message
...
Is there a way I can specify a starting column and number of columns in

the
following statement:

Selection.AutoFill Destination:=Columns("D:H"), Type:=xlFillDefault

Starting column is D
Number of colums?





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default AutoFill columns

Selection.AutoFill Destination:=Range("D1").Resize(1, 4).EntireColumn,
Type:=xlFillDefault

although, as the source and initial destination are the same why not use

Dim myRange As Range
Set myRange = Selection.EntireColumn
myRange.AutoFill Destination:=myRange.Resize(1, 4).EntireColumn,
Type:=xlFillDefault

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Charlie" wrote in message
...
Is there a way I can specify a starting column and number of columns in

the
following statement:

Selection.AutoFill Destination:=Columns("D:H"), Type:=xlFillDefault

Starting column is D
Number of colums?





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default AutoFill columns

Thanks

"Tom Ogilvy" wrote in message
...
NumColumns = 5
Selection.AutoFill Destination:=Columns("D:D").Resize(,NumColumns),
Type:=xlFillDefault

--
Regards,
Tom Ogilvy

"Charlie" wrote in message
...
Is there a way I can specify a starting column and number of columns in

the
following statement:

Selection.AutoFill Destination:=Columns("D:H"), Type:=xlFillDefault

Starting column is D
Number of colums?







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default AutoFill columns

Thanks

"Bob Phillips" wrote in message
...
Selection.AutoFill Destination:=Range("D1").Resize(1, 4).EntireColumn,
Type:=xlFillDefault

although, as the source and initial destination are the same why not use

Dim myRange As Range
Set myRange = Selection.EntireColumn
myRange.AutoFill Destination:=myRange.Resize(1, 4).EntireColumn,
Type:=xlFillDefault

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Charlie" wrote in message
...
Is there a way I can specify a starting column and number of columns in

the
following statement:

Selection.AutoFill Destination:=Columns("D:H"), Type:=xlFillDefault

Starting column is D
Number of colums?







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 with different Columns rockytopfan4ever Excel Discussion (Misc queries) 0 July 30th 08 05:56 PM
Autofill columns relo Excel Worksheet Functions 3 July 3rd 07 10:56 PM
Autofill counting up Columns and Rows! fantomet Excel Worksheet Functions 5 December 14th 06 12:57 PM
autofill information from rows to columns without using transpose Rayce Excel Discussion (Misc queries) 1 September 4th 05 01:44 AM
Autofill across columns Tom Ogilvy Excel Programming 0 May 18th 04 05:01 PM


All times are GMT +1. The time now is 03:14 PM.

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"