Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,276
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default 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
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
Macro auto fill formula Erin Excel Worksheet Functions 4 May 22nd 09 01:04 PM
Recording Macro to auto-fill Zee Excel Discussion (Misc queries) 1 July 2nd 08 11:12 PM
How do I create an email macro to auto fill the email? Justin[_4_] Excel Discussion (Misc queries) 0 November 14th 07 10:49 PM
Auto-populate, Auto-copy or Auto-fill? Jay S. Excel Worksheet Functions 4 August 10th 07 09:04 PM
Macro for Auto Fill carolini Excel Discussion (Misc queries) 2 December 6th 05 09:11 PM


All times are GMT +1. The time now is 12:05 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"