ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   AutoFill down X number of rows. (https://www.excelbanter.com/excel-discussion-misc-queries/84836-autofill-down-x-number-rows.html)

Paul987

AutoFill down X number of rows.
 

Hello. I am trying to autofill a formula down a certain number of rows.
The number is located in cell L4. I can't seem to figure out the
syntax for this. This is what I have, but it does not work.

Selection.AutoFill Destination:=Range("A1:A" + Cells(4, 12)),
Type:=xlFillDefault

Any Help would be great. TIA
Paul


--
Paul987
------------------------------------------------------------------------
Paul987's Profile: http://www.excelforum.com/member.php...o&userid=24850
View this thread: http://www.excelforum.com/showthread...hreadid=535596


JE McGimpsey

AutoFill down X number of rows.
 
One way:


With Selection
.AutoFill Destination:=.Resize(Cells(4, 12).Value, 1), _
Type:=xlFillDefault
End With

In article ,
Paul987 wrote:

Hello. I am trying to autofill a formula down a certain number of rows.
The number is located in cell L4. I can't seem to figure out the
syntax for this. This is what I have, but it does not work.

Selection.AutoFill Destination:=Range("A1:A" + Cells(4, 12)),
Type:=xlFillDefault


Paul987

AutoFill down X number of rows.
 

I only needed one way. That worked well. Thanks
Paul


--
Paul987
------------------------------------------------------------------------
Paul987's Profile: http://www.excelforum.com/member.php...o&userid=24850
View this thread: http://www.excelforum.com/showthread...hreadid=535596



All times are GMT +1. The time now is 12:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com