Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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. |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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. |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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. |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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. |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro auto fill formula | Excel Worksheet Functions | |||
Recording Macro to auto-fill | Excel Discussion (Misc queries) | |||
How do I create an email macro to auto fill the email? | Excel Discussion (Misc queries) | |||
Auto-populate, Auto-copy or Auto-fill? | Excel Worksheet Functions | |||
Macro for Auto Fill | Excel Discussion (Misc queries) |