Written by Allen Wyatt (last updated August 23, 2025)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Excel in Microsoft 365
When Dennis is developing a worksheet, he knows he can use the fill handle to drag downward to fill cells with a formula (the formula in the cell that he's dragging down). He wonders, though, if there is a fast way to fill downwards a specific number of cells, such as 50 or 100 cells.
Short of using a macro, there are two very easy ways to accomplish this task. Here is the first approach:
An even quicker way that bypasses the Clipboard is to follow these steps:
If you prefer to go a macro-based route, the following is one approach:
Sub FillRows() Dim Nrows As Variant Nrows = Application.InputBox("Fill how many rows?", Type:=1) If Nrows Then If Nrows < 0 And Abs(Nrows) >= ActiveCell.Row Then Nrows = -ActiveCell.Row + 1 End If ActiveSheet.Range(ActiveCell.Address).AutoFill _ Destination:=Range(Cells(ActiveCell.Row, _ ActiveCell.Column), Cells(ActiveCell.Row + Nrows, _ ActiveCell.Column)), Type:=xlFillDefault End If End Sub
To use the macro, select the cell you want to use in the fill, then run it. You are asked for how many cells you want to fill, and then the macro dutifully fills that many cells down (a positive value) or up (a negative value). If you enter a negative value that is greater than the number of rows above the current cell, then the operation adjusts the number of rows to fill.
The benefit to using a macro-based approach is that you don't have to calculate the range of cells you want to fill. You can simply specify how many, and the macro takes care of the rest. If you assign the macro to a shortcut key, then you can invoke it with a single keystroke.
Note:
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (13514) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Excel in Microsoft 365.
Dive Deep into Macros! Make Excel do things you thought were impossible, discover techniques you won't find anywhere else, and create powerful automated reports. Bill Jelen and Tracy Syrstad help you instantly visualize information to make it actionable. You’ll find step-by-step instructions, real-world case studies, and 50 workbooks packed with examples and solutions. Check out Microsoft Excel 2019 VBA and Macros today!
When working with data created outside of Excel, you may need to check that data to make sure it contains no unwanted ...
Discover MoreNeed to make sure that information entered in a worksheet is always in a given unit of measurement? It's not as easy of a ...
Discover MoreExcel allows you to edit the contents of a cell in two places--"the cell itself or in the Formula bar. If you want to ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2025-08-26 04:05:10
Alan
You can also use Go To (F5) and just type the end cell, then hold Shift as you click OK. Then Ctrl+D as above.
2025-08-25 12:03:14
Earlier you provided a solution for formatting Canadian postal codes, that requires an additional column. Is there any way to create and store a special format formula for them, so that i don't have to have that extra column?
2025-08-24 12:15:22
J. Woolley
The following statement in the Tip's macro
        ActiveSheet.Range(ActiveCell.Address).AutoFill _
            Destination:=Range(Cells(ActiveCell.Row, _
            ActiveCell.Column), Cells(ActiveCell.Row + Nrows, _
            ActiveCell.Column)), Type:=xlFillDefault
can be simplified by replacing it with this statement
        ActiveCell.AutoFill _
            Destination:=Range(ActiveCell, ActiveCell.Offset(Nrows)), _
            Type:=xlFillDefault
for the same result.
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2025 Sharon Parq Associates, Inc.
Comments