ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Auto Fill Down Macro (https://www.excelbanter.com/excel-worksheet-functions/238366-auto-fill-down-macro.html)

Angela T

Auto Fill Down Macro
 
Is there a macro that I can setup to auto fill down? For example I have an
Excel file that has numbers or text in column A rows 1, 5, 10, 17, etc. I
want to auto fill down whatever is in the cell above, only to the next
un-empty cell. So A1 auto fills down thru A2-A4 then A5 atuo fills down thru
A6-A9 and so on.

Eduardo

Auto Fill Down Macro
 
Hi,
Look into Debra web she has exactly what you need

http://www.contextures.com/xlDataEntry02.html

"Angela T" wrote:

Is there a macro that I can setup to auto fill down? For example I have an
Excel file that has numbers or text in column A rows 1, 5, 10, 17, etc. I
want to auto fill down whatever is in the cell above, only to the next
un-empty cell. So A1 auto fills down thru A2-A4 then A5 atuo fills down thru
A6-A9 and so on.


Shane Devenshire[_2_]

Auto Fill Down Macro
 

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Angela T" wrote:

Is there a macro that I can setup to auto fill down? For example I have an
Excel file that has numbers or text in column A rows 1, 5, 10, 17, etc. I
want to auto fill down whatever is in the cell above, only to the next
un-empty cell. So A1 auto fills down thru A2-A4 then A5 atuo fills down thru
A6-A9 and so on.


Shane Devenshire[_2_]

Auto Fill Down Macro
 
Sorry about that last non-post.

Try this:

Sub myAutoFill()
Dim Bot As Long
With ActiveCell
Bot = .Offset(-1, 0).End(xlDown).Row - 1
.Offset(-1, 0).AutoFill _
Destination:=Range(.Offset(-1, 0).Address, Cells(Bot, .Column)), _
Type:=xlFillDefault
End With
End Sub

Assign a shortcut and make it faster.

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Angela T" wrote:

Is there a macro that I can setup to auto fill down? For example I have an
Excel file that has numbers or text in column A rows 1, 5, 10, 17, etc. I
want to auto fill down whatever is in the cell above, only to the next
un-empty cell. So A1 auto fills down thru A2-A4 then A5 atuo fills down thru
A6-A9 and so on.


fruitchunk

Auto Fill Down Macro
 
How do fix this macro it should always fill down the column regardles of the
range?

Sub autofill()
'
' autofill Macro
'

'
Range("G14").Select
ActiveCell.FormulaR1C1 = "=RC[1]+RC[2]"
Range("G14").Select
Selection.NumberFormat = "0.00"
Selection.autofill Destination:=Range("G14:G378")
Range("G14:G378").Select
End Sub

"Shane Devenshire" wrote:

Sorry about that last non-post.

Try this:

Sub myAutoFill()
Dim Bot As Long
With ActiveCell
Bot = .Offset(-1, 0).End(xlDown).Row - 1
.Offset(-1, 0).AutoFill _
Destination:=Range(.Offset(-1, 0).Address, Cells(Bot, .Column)), _
Type:=xlFillDefault
End With
End Sub

Assign a shortcut and make it faster.

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Angela T" wrote:

Is there a macro that I can setup to auto fill down? For example I have an
Excel file that has numbers or text in column A rows 1, 5, 10, 17, etc. I
want to auto fill down whatever is in the cell above, only to the next
un-empty cell. So A1 auto fills down thru A2-A4 then A5 atuo fills down thru
A6-A9 and so on.


Gord Dibben

Auto Fill Down Macro
 
You must pick a column that will have data to last row.

Your formula "=RC[1]+RC[2]" denotes column H and I offset from column G so I
will assume column H has data.

Sub Auto_Fill()
Dim lRow As Long
With ActiveSheet
lRow = .Range("H" & Rows.Count).End(xlUp).Row
.Range("G14").FormulaR1C1 = "=RC[1]+RC[2]"
.Range("G14:G" & lRow).FillDown
End With
End Sub


Gord Dibben MS Excel MVP

On Mon, 16 Nov 2009 21:53:03 -0800, fruitchunk
wrote:

How do fix this macro it should always fill down the column regardles of the
range?

Sub autofill()
'
' autofill Macro
'

'
Range("G14").Select
ActiveCell.FormulaR1C1 = "=RC[1]+RC[2]"
Range("G14").Select
Selection.NumberFormat = "0.00"
Selection.autofill Destination:=Range("G14:G378")
Range("G14:G378").Select
End Sub

"Shane Devenshire" wrote:

Sorry about that last non-post.

Try this:

Sub myAutoFill()
Dim Bot As Long
With ActiveCell
Bot = .Offset(-1, 0).End(xlDown).Row - 1
.Offset(-1, 0).AutoFill _
Destination:=Range(.Offset(-1, 0).Address, Cells(Bot, .Column)), _
Type:=xlFillDefault
End With
End Sub

Assign a shortcut and make it faster.

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Angela T" wrote:

Is there a macro that I can setup to auto fill down? For example I have an
Excel file that has numbers or text in column A rows 1, 5, 10, 17, etc. I
want to auto fill down whatever is in the cell above, only to the next
un-empty cell. So A1 auto fills down thru A2-A4 then A5 atuo fills down thru
A6-A9 and so on.




All times are GMT +1. The time now is 04:12 PM.

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