Copy a formula to every row at once by selecting the cell with the formula, then dragging down or using keyboard shortcuts

The fastest way to explore a formula to an entire column is to enter the formula in the first cell, then use Ctrl+D (Windows) or Cmd+D (Mac) to fill down. First, click the cell where your formula is. Then select from that cell all the way down to the last row you need — you can do this by holding Shift and clicking the bottom cell, or by holding Shift and pressing Ctrl+End to select to the end of your data. Then press Ctrl+D, and Excel copies the formula to every selected cell, automatically adjusting the cell references as it goes.

If you only want to fill down a specific number of rows, you can also double-click the small square in the bottom-right corner of the cell (called the fill handle). Excel will automatically fill down until it hits an empty row, which works well when your data has no gaps. For columns where your data does have gaps, the drag method gives you more control — just click and hold that small square and drag down as far as you need.

Key Takeaways

  • Select the cell with your formula, then extend the selection down to include all rows where you want the formula to appear.
  • Press Ctrl+D (or Cmd+D on Mac) to fill the formula down to every selected cell at once.
  • Excel automatically adjusts cell references in the formula for each row, so a formula referencing A1 becomes A2, A3, and so on as it fills down.
  • Double-clicking the fill handle (the small square at the bottom-right of a cell) auto-fills down until Excel hits an empty row.
  • The drag method works for any number of rows and gives you precise control over where the formula stops.

Understanding relative and absolute references before you fill down

When you copy a formula down a column, Excel changes the cell references unless you tell it not to. A formula like =A1*2 becomes =A2*2 in the next row, then =A3*2 in the row after that. This is called a relative reference, and it is usually what you want — each row calculates based on the data in that same row.

Sometimes you need a cell reference to stay the same as the formula fills down. If you want every row to multiply by the value in cell B1, you write =A1*$B$1. The dollar signs lock that reference so it stays B1 in every row, while A1 still changes to A2, A3, and so on. You can also lock just the column ($B1) or just the row (B$1) if you need partial locking. Test your formula in the first row by looking at what it calculates, then fill down and spot-check a few rows to make sure the references adjusted the way you intended.

Using the fill handle to drag formulas down quickly

The fill handle is the small square at the bottom-right corner of any selected cell. When you hover over it, your cursor changes to a crosshair. Click and hold, then drag down the column to copy the formula to as many rows as you need. This method is fast for small ranges and gives you visual feedback as you drag.

The fill handle works best when your data is continuous with no gaps. If you have 50 rows of data and you drag the fill handle down 50 times, Excel copies the formula to all 50 rows. If your data has empty rows in the middle, you can still drag past them — just count carefully or use the keyboard method instead, which is more precise.

Selecting the range before you fill down

The most reliable method is to select the entire range first, then use Ctrl+D. Click the cell with your formula. Hold Shift and click the last cell in the column where you want the formula to appear. Now the entire range is highlighted. Press Ctrl+D, and the formula fills to every cell in that selection.

If your data extends to row 1000 but you only want the formula in rows 1 through 500, this method ensures you do not accidentally fill beyond where you need it. You can also type the range directly into the Name Box (the field that shows the cell address, usually in the top-left corner). Type something like A1:A500, press Enter, and then press Ctrl+D to fill the entire range at once.

Filling down when your data has gaps or irregular spacing

If your spreadsheet has empty rows or your data does not start in row 1, the auto-fill methods can behave unexpectedly. The safest approach is to select the exact range you need manually. Click your formula cell, then hold Shift and click the last cell where you want it to appear. This works regardless of whether there are gaps in between.

Another option is to use the Go To Special feature. Select the range that includes your formula and any empty cells below it. Press Ctrl+H to open Find & Replace, then close it (this resets the selection). Now select your range again and use Ctrl+D. This forces Excel to fill only the cells you selected, ignoring any gaps. For very large or complex spreadsheets, selecting manually takes a few extra seconds but prevents mistakes that would require undoing and redoing the work.

What happens when you fill down a formula with mixed cell types

If your formula references both cells and fixed numbers, filling down works the same way. A formula like =A1+100 becomes =A2+100, then =A3+100, and so on. The cell reference changes, but the number stays the same. This is the expected behavior and usually what you want.

If your formula includes functions like SUM or AVERAGE, filling down can produce unexpected results. A formula like =SUM(A1:A10) becomes =SUM(A2:A11) in the next row, which might not be what you intended. If you want every row to sum the same range, use absolute references: =SUM($A$1:$A$10). Test the first cell to confirm it calculates correctly, then fill down and check that the other rows show the same result.

Undoing a fill if the formula did not copy the way you expected

If you fill down and the results look wrong, press Ctrl+Z when ready to undo. Check your original formula by clicking the first cell and looking at the formula bar at the top of the screen. Make sure the cell references are what you intended. If you need absolute references, edit the formula to add dollar signs, then fill down again.

A common mistake is filling down too far and covering rows that should be empty, or filling down a formula that references cells above it when those cells do not exist in every row. Undo, select a smaller range, and try again. Excel will not warn you if a formula is referencing the wrong cells — it will just calculate based on what you wrote — so always spot-check a few rows after filling to make sure the numbers make sense.

Frequently Asked Questions

Can I fill a formula across columns instead of down rows?

Yes. Select the cell with your formula, then extend the selection to the right to include all columns where you want it. Press Ctrl+R (Windows) or Cmd+R (Mac) to fill right. The same relative reference rules explore — cell references adjust as the formula moves across columns.

What if I want to fill down but keep some rows empty?

Select only the cells where you want the formula, skipping the empty rows. You can do this by clicking the first cell, holding Ctrl, and clicking each additional cell you want to include. Then press Ctrl+D to fill only those selected cells. This is slower than filling a continuous range, but it gives you complete control.

Does filling down work the same way in Google Sheets?

Google Sheets uses the same fill-down concept, but the keyboard shortcut is Ctrl+D on Windows and Cmd+D on Mac, just like Excel. You can also drag the fill handle the same way. The relative and absolute reference rules are identical, so formulas behave the same across both programs.

How do I fill down a formula to thousands of rows without manually selecting them all?

Click the cell with your formula. Press Ctrl+Shift+End to select from that cell to the last cell with data in your spreadsheet. Then press Ctrl+D. This fills the formula down to match the extent of your data. If your data is not rectangular, this may select more cells than you need, so check the result and undo if necessary.

What if the formula references a cell that does not exist in lower rows?

Excel will still fill the formula down and calculate based on whatever cells the adjusted references point to. If your formula is =A1+B1 and you fill it down to row 1000, row 1000 will calculate =A1000+B1000. If those cells are empty, the result will be 0 or blank. Always check that your data extends far enough to support the formula in every row where you fill it.