How to Add a Formula to an Entire Row in Excel

Formulas & functions · Updated November 18, 2026

To add a formula across a row in Excel, enter it in the first cell where you want a result, select that cell and the cells to its right, then choose Home > Fill > Right. Excel copies the formula across and adjusts relative cell references. Use a specific range of columns rather than filling all 16,384 columns unless you genuinely need them.

What You’ll Need

  • An Excel workbook with the source values or references your formula will use.
  • A clear starting cell and ending cell for the results. For example, decide whether the formula should go from B3 to G3, rather than assuming it should fill every column in the worksheet.
  • Microsoft Excel for Microsoft 365 on Windows for the steps below. In Excel for Mac, the ribbon command is available too; use Home > Fill > Right if the Windows keyboard shortcut differs. In Excel for the web, dragging the fill handle is a practical alternative.

Step-by-Step

  1. Decide what you mean by the entire row. A formula can be copied horizontally across one record, such as from January through June, or copied vertically down a column for many records. These are different operations. This guide first covers copying horizontally across a row. If you mean one formula for every record, see step 6. Write down the first and last result cells you need so you do not fill unused columns by mistake.

  2. Check the cell layout and decide how references should move. In this example, cell A1 contains a tax rate of 10%, cells B2:G2 contain amounts of 50, 80, 20, 100, 40, and 60, and the results belong in B3:G3. The rate is in a fixed cell, while the amount should move one column to the right for each result. Locking the rate reference with dollar signs keeps it fixed when Excel copies the formula.

  3. Enter the formula in the first result cell. With the layout just described, enter =B2*$A$1 in B3. The formula multiplies the first amount, 50, by the 10% rate in A1, so B3 should display 5. If your cell is formatted as currency, Excel may show a currency symbol; the underlying result is still 5. Press Enter to commit the formula before copying it.

  4. Select the formula cell and the destination cells. Click B3, then drag across to G3 so the selection includes B3:G3. The cell containing the original formula must be the leftmost cell in the selection. You can also click the Name Box to the left of the formula bar, type B3:G3, and press Enter. Check the highlighted range before filling; selecting only C3:G3 would leave the source cell out.

  5. Fill the formula to the right. In Excel for Microsoft 365 on Windows, press Ctrl+R. Excel fills the selected cells from the leftmost cell, copying the formula and adjusting references. You can instead choose Home > Fill > Right. On Mac, use Home > Fill > Right if the shortcut is different in your Excel setup. In Excel for the web, select the formula cell and drag its small fill handle across the destination cells.

  6. Verify the copied formulas and results. Click C3 and look at the formula bar. With the example layout, the formula should now refer to C2 while still using the fixed rate in A1. The results across B3:G3 should be 5, 8, 2, 10, 4, and 6. If a result looks wrong, check the formula bar rather than relying only on the displayed number; formatting can hide decimals or make values look alike.

  7. Save the workbook and keep the filled range manageable. If the formula is meant to cover more columns, select a larger, appropriate range and repeat the fill. Excel worksheets have 16,384 columns, ending at XFD, but filling an entire row can create thousands of unnecessary formulas and make a workbook slower or harder to use. If you need a new formula in every column for future records, consider using an Excel Table or filling only the columns that will contain data.

If your goal is one formula in every cell of the row: Excel can fill a formula across a selected range, but it cannot place a single formula in a way that automatically calculates every unrelated cell in the row without choosing how each cell should behave. Decide whether each cell should contain a separate adjusted formula, or whether one formula should return a result that spills into neighboring cells. A spill formula depends on the task and available Excel functions, so it is not a universal replacement for Fill Right.

If your goal is the same calculation for each row of data: enter the formula in the first result row, select that cell and the cells below it, then choose Home > Fill > Down. On Windows, Ctrl+D fills down. For example, with prices in A2:A100 and shipping costs in B2:B100, put =A2+B2 in C2 and fill down through C100. The first result adds the values in A2 and B2; subsequent rows adjust to A3 plus B3, A4 plus B4, and so on.

Common Mistakes

  • Filling the wrong direction. Fill Right copies the leftmost selected cell across columns; Fill Down copies the top cell down rows. If your results are arranged left to right, use Fill Right, not Fill Down.

  • Leaving out the source cell. When using Ctrl+R or Home > Fill > Right, include the cell that already contains the formula in the selection. Otherwise Excel may fill from a different cell or leave the intended first result unchanged.

  • Using relative references when a reference should stay fixed. A reference such as A1 changes as a formula is copied. If every result must use the same rate in A1, write the reference as $A$1. Conversely, locking every reference can cause every copied formula to calculate from the same source cells when you expected them to shift.

  • Filling the whole worksheet row unnecessarily. Selecting all columns may create a huge number of formulas, including formulas in cells that should remain empty. This can increase file size, slow recalculation, and make later editing confusing. Fill only the range required for the task.

  • Expecting the displayed value to reveal the formula. Two cells can show the same rounded number while using different references. Click the cells and compare the formula bar, or use the arrow keys to inspect the formula in each position.

  • Overwriting existing data. Filling across replaces the contents of destination cells. Before you use Fill Right, check whether those cells contain notes, values, or formulas you still need. Undo immediately with Ctrl+Z on Windows if you fill over something by mistake; on Mac, use Command+Z.

Tips

  • Use the fill handle for a short range when you want a visual way to copy. It is the small square at the bottom-right corner of the selected cell. Drag it across the intended destinations, then inspect the last cell to confirm the range.

  • Use the Name Box for a long or precise range. Typing a range such as B3:G3 selects exactly those cells without dragging across the sheet. This is especially useful when the destination is off-screen.

  • Use dollar signs deliberately. A1 is a fully relative reference; $A$1 locks both the column and row; $A1 locks only the column; A$1 locks only the row. Press F4 while editing a reference in Excel for Windows to cycle through reference styles. On Mac, the shortcut may depend on keyboard settings; you can type the dollar signs directly.

  • Format the destination cells after the formula works. Choose Home > Number Format to display results as currency, percentages, dates, or another suitable format. Formatting changes how a result appears, not the calculation itself.

  • For data that will grow, convert the range into an Excel Table with Insert > Table. A calculated column can carry a formula down as you add rows, which is usually more practical than filling thousands of cells in advance. A Table is for repeated records down a column; it does not replace a horizontal fill across a single row.

Troubleshooting

  • The cells show the same result. Check whether the formula uses absolute references such as $B$2 for every input. If each column should use its own source cell, remove the dollar signs from the parts that need to change. Also confirm that the selected range began with the correct formula cell.

  • The formula appears as text instead of calculating. Select the cell and check Home > Number Format. If it is set to Text, change it to General, then edit the cell and press Enter again. Also check that the formula begins with an equals sign and that there is no apostrophe or leading space before it.

  • Excel displays ######. This usually means the column is too narrow for the formatted result, rather than that the formula failed. Widen the column by dragging its right boundary or double-clicking the boundary in the column heading. If the result is a negative date or time, review the calculation and number format as well.

  • The result is wrong only in later columns. Select a cell that gives the wrong answer and inspect its references in the formula bar. A relative reference may have shifted farther than intended, or a mixed reference may have locked the wrong row or column. Correct the formula in the first cell, then refill the range so the pattern is consistent.

  • Ctrl+R does not fill right. Make sure you are using desktop Excel for Windows, the selection contains the source formula at its left edge, and the worksheet is not in cell-edit mode. If the shortcut is unavailable or behaves differently on your device, use Home > Fill > Right. In Excel for the web, use the fill handle instead.

Frequently Asked Questions

Can I apply a formula to an entire row in one action?
Yes. Enter a formula in the first cell, select that cell and the destination cells to its right, then use Home > Fill > Right. In desktop Excel for Windows, Ctrl+R is the shortcut. Choose a bounded range unless you truly need formulas across every worksheet column.

How do I copy a formula across a row without changing one reference?
Make the reference absolute by adding dollar signs to the column and row that must stay fixed. For example, $A$1 stays at A1 when copied. Leave other references relative if they should move across the row.

Can I use the fill handle instead of Ctrl+R?
Yes. Select the formula cell, point to the small square at its bottom-right corner, and drag across the cells to fill. This works in desktop Excel and is also a useful method in Excel for the web. Check the last filled cell to ensure you stopped in the right place.

How do I put a formula down a whole column of records?
Enter the formula in the first result cell, select that cell and the cells below it, and choose Home > Fill > Down. On Windows, Ctrl+D fills down. For a changing data set, a Table calculated column can extend the formula when new rows are added.

Will filling a formula across overwrite existing cells?
Yes. Fill Right replaces the contents of the destination cells with copied formulas. Check the range first, and save a copy if the existing data is important. If you overwrite something accidentally, use Undo before making further edits.

Why does a formula copied across a row give a different answer in each cell?
That is normally expected: relative references adjust as the formula moves. If every result should point to the same source cell, lock that reference with dollar signs. If each result should use a different source column, leave the relevant reference relative.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.