Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Autofill to last row in a database
I have a large file but it varies in size each month. When i recorded a
macro the file seems to copy down the column in a fixed method as shown below- Selection.AutoFill Destination:=Range("H2:H15952") Range("H2:H15952").Select I was wondering what i can insert in these areas so that it will AutoFill automatically to the bottom row of column F no matter how many cells are present. Please help me out. Thanks -- Message posted via http://www.officekb.com |
#2
|
|||
|
|||
Jon,
Selection.AutoFill Destination:=Range("H2:H" & Range("F65536").End(xlUp).Row) HTH, Bernie MS Excel MVP "JOn Kunces" wrote in message ... I have a large file but it varies in size each month. When i recorded a macro the file seems to copy down the column in a fixed method as shown below- Selection.AutoFill Destination:=Range("H2:H15952") Range("H2:H15952").Select I was wondering what i can insert in these areas so that it will AutoFill automatically to the bottom row of column F no matter how many cells are present. Please help me out. Thanks -- Message posted via http://www.officekb.com |
#3
|
|||
|
|||
I am attempting to do basically the same thing and I can't get the string to work. I am inserting a column for an Id number and need it to autofill down to the last row of the database. Did you have success using the string? Here is a copy of the macro I am attempting to create. Any help would be appreciated. Selection.EntireColumn.Insert Range("A1").Select ActiveCell.FormulaR1C1 = "Id" Range("A2").Select ActiveCell.FormulaR1C1 = "1" Range("A3").Select ActiveCell.FormulaR1C1 = "2" Range("A4").Select ActiveCell.FormulaR1C1 = "3" Selection.AutoFill Destination:=Range("B2:B" & Range("B65536").End(xlUp).Row) -- tcowen ------------------------------------------------------------------------ tcowen's Profile: http://www.excelforum.com/member.php...fo&userid=6921 View this thread: http://www.excelforum.com/showthread...hreadid=385338 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Autofill: Need to autofill one week block, (5) weekday only into cells. | Excel Discussion (Misc queries) | |||
multiple items in database | Excel Worksheet Functions | |||
make existing pivot charts point at the same database | Charts and Charting in Excel | |||
The Template Wizard retains the original location for my database | Excel Discussion (Misc queries) | |||
Graphing Database Growth Rate | Charts and Charting in Excel |