To copy a formula across a row in Excel, enter it in the leftmost cell, select that cell and the cells to its right, then choose Home > Fill > Right or press Ctrl+R in Excel for Windows. Excel copies the formula across the selected cells and adjusts relative references as it goes. You can also drag the fill handle to the right; select only the columns you actually need unless you truly want to fill all 16,384 columns in a worksheet row.
What You’ll Need
- An Excel workbook with the source formula entered in the first cell of the range you want to fill.
- A clear idea of the last column that needs the formula. A typical range might be B2:G2 rather than the entire worksheet row.
- Unmerged destination cells and permission to edit the worksheet. If the sheet is protected, you may need to ask the workbook owner to unlock the cells or remove protection.
Step-by-Step
- Check how the formula should change. Excel normally adjusts relative references when you copy a formula sideways. For example, a reference to B1 in a formula in B2 will usually shift to C1 when the formula is copied into C2. Decide whether those references should move, stay fixed, or partly stay fixed before you fill the row. Dollar signs in a reference lock its column, row, or both.
- Enter the formula in the first destination cell. Put the formula in the leftmost cell that should contain a result. For a practical example, suppose A2 contains an amount of 100 and B1:G1 contain rates, with B1 set to 5%. Enter the following in B2. This layout means the formula uses the rate above the current column and the fixed amount in A2:
=B$1*$A2
The result in B2 is 5. The dollar sign in B$1 keeps the rate on row 1 while allowing its column to move. The dollar sign in $A2 keeps the amount in column A when the formula is copied horizontally. - Select the source cell and the cells to fill. Click B2, then drag across the row to G2, or click B2 and Shift-click G2. The source cell must be the leftmost cell in the selection because Fill Right uses its contents to fill the other selected cells. In this example, select B2:G2. You can select a longer range if you need more results, but avoid including columns that should remain blank or contain different data.
- Use Fill Right. On the ribbon, select Home > Fill > Right. Excel copies the formula in B2 across the selected range. In C2, the references become C$1 and $A2; in D2, they become D$1 and $A2. With B1 set to 5% and A2 set to 100, B2 displays 5. If C1 is 6%, C2 displays 6, and the amount reference remains in column A.
- Or use the Windows keyboard shortcut. Select the same range, with the formula cell at the left edge, and press Ctrl+R. This is Excel’s Fill Right shortcut. If you use Excel for Mac, the ribbon route Home > Fill > Right is a dependable alternative; keyboard shortcuts can vary with the keyboard layout and macOS settings. In Excel for the web, use the ribbon command if the shortcut is intercepted by the browser.
- Or drag the fill handle. Click the formula cell and point to the small square at the bottom-right corner of its border. When the pointer changes to a small black cross, drag the handle to the right across the destination cells and release. Check the final cell to make sure the formula reached the intended column. If the fill handle is missing, see Troubleshooting below.
- Check the copied formulas and results. Click one or more filled cells and inspect the formula bar. Confirm that references moved as intended and that each result is plausible. In this example, the rate reference should follow the column while the amount reference should stay in column A. Save the workbook after confirming the fill.
If you literally mean every cell in the worksheet row, select the row by clicking its number after placing the source formula in the leftmost cell, then use Home > Fill > Right. Excel has 16,384 columns per row, so filling all of them can create unnecessary formulas, slow recalculation, or make the file harder to navigate. Filling just the required range is usually safer.
Common Mistakes
- Selecting the wrong starting cell. Fill Right takes the value or formula from the leftmost cell in the selected range. If that cell is blank or contains a different formula, Excel will fill from the wrong starting point. Include the formula cell at the left edge of your selection.
- Expecting every reference to stay the same. Relative references shift as a formula moves. If you need a cell to remain fixed, add dollar signs. For example, $A$1 locks both the column and row; A$1 locks only the row; $A1 locks only the column. Check the formula in the destination cells rather than assuming Excel knows which references you intended to lock.
- Filling farther than necessary. Selecting an entire row may put formulas into thousands of cells that have no data. This can increase workbook size and make later editing confusing. Select only the range where results are needed, and leave headings, notes, and unrelated calculations out of it.
- Overwriting existing content. Fill Right replaces the contents of destination cells. Before filling, confirm that those cells do not contain values, formulas, or notes you need to keep. If you are unsure, save a copy of the workbook first.
- Using Fill Right when the formula should not move sideways. Copying a formula across a row is different from copying it down a column. If your layout calls for the same fixed reference in each cell, lock the appropriate row or column with dollar signs. If the values are arranged vertically, use Fill Down instead.
Tips
- Use mixed references for repeated row calculations. Dollar signs let part of a reference move while another part stays put. In the example, B$1 changes to C$1 across the row, while $A2 stays in column A. This is useful when each column has its own rate, month, category, or other heading, but all calculations use one input column.
- Use the formula bar to verify a reference. Click a filled cell and read its formula in the formula bar. This is more reliable than checking the displayed result alone, especially when different formulas happen to produce the same number.
- Use copy and paste if you want more control. Copy the formula cell, select the destination cells, then paste. Standard copy and paste also adjusts relative references. If you need to paste only the formula and not formatting, use the Paste Options button that appears after pasting and choose the formulas option where available.
- Undo immediately if the wrong cells changed. Press Ctrl+Z on Windows or Command+Z on Mac to undo the fill, then select the correct range and try again. Check that the selected cells start with the intended formula cell before repeating the command.
- Remember that filling is not the same as inserting a table column. Excel tables can automatically extend a calculated column down a table, but that behavior does not automatically fill a formula horizontally across a worksheet row. For a horizontal calculation, select the row range and use Fill Right.
Troubleshooting
The formula did not fill across. Re-select the source formula cell and the destination cells to its right, making sure the formula cell is the first cell in the selection. Then use Home > Fill > Right. If you selected the destination cells but left out the source cell, Excel has no correct leftmost formula to copy.
The results are wrong even though the formula copied. Click a result cell and compare its formula with the source. If a reference moved that should have stayed fixed, edit the source formula to add the needed dollar sign, then fill the range again. For example, lock a fixed column with $A or a fixed row with $1. If the formula shows an error such as #REF!, a referenced cell or range may have been deleted or moved; repair the source formula before filling again.
The fill handle will not appear or drag. In Excel for Microsoft 365 on Windows, check the setting under File > Options > Advanced and make sure Enable fill handle and cell drag-and-drop is turned on. On Mac, check Excel settings or preferences for the fill-handle and cell-drag option; its location can differ by release. You can avoid the handle entirely by selecting the range and choosing Home > Fill > Right.
Excel refuses to fill the selected cells. Look for merged cells in the range, since merged cells can prevent normal filling. Also check whether the worksheet is protected or whether the target cells are locked. Unmerge cells only if doing so is appropriate for the layout, or ask the workbook owner to grant edit access. If a warning says the action would overwrite data, inspect the destination cells before proceeding.
The displayed values do not change after filling. Confirm that the source formula is correct and that calculation is not set to manual. In Excel for Windows, check Formulas > Calculation Options and select Automatic if that is appropriate for the workbook. You can also press F9 to recalculate. If the formula is displayed as text instead of calculating, check whether the cell is formatted as Text; change it to General, then re-enter the formula.
Frequently Asked Questions
How do I copy a formula across a row without dragging?
Select the formula cell and the cells to its right, then choose Home > Fill > Right. In Excel for Windows, Ctrl+R performs the same fill on the selected range.
Will Excel change cell references when I fill right?
Yes. Relative references usually shift one column for each cell the formula moves. Absolute references with dollar signs stay fixed, while mixed references lock only the row or column marked with a dollar sign.
Can I copy a formula across the entire worksheet row?
Yes. Select the row by its row number and use Home > Fill > Right, with the formula in the leftmost cell. This fills as many as 16,384 columns, so use a smaller range unless every column genuinely needs a formula.
What is the difference between Fill Right and dragging the fill handle?
Both can copy a formula horizontally and adjust references. Fill Right works on a selected range through the ribbon or shortcut; dragging the fill handle lets you choose the destination by pulling the corner of the source cell.
Can I copy the formula but keep the same references?
Use absolute references for the parts that must not change, such as $A$1. If only one part should remain fixed, use a mixed reference such as A$1 or $A1. Check the filled formulas to confirm they match your intended calculation.
Related
- Move a Row Up or Down in Excel Without Losing Data
- How to Move Cells Down in Excel Without Overwriting Data
- How to Merge Cells in Excel: Steps and Safe Options
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Excel SUMIF Criteria Examples for Text, Dates, and NumbersExcel’s SUMIF function adds values when one matching condition is true. With categories in A2:A7 and amounts in…
- How to Find the Mode in Excel: Formulas and ExamplesTo find the most frequently occurring number in Excel, enter =MODE.SNGL(A2:A11) in an empty cell, replacing A2:A11 with…
- How to Add Page Numbers in Word Bottom Right CornerTo add page numbers at the bottom right in Word for Microsoft 365 on Windows, select Insert >…
- Excel Data Validation List Formula: Examples and FixesFor an Excel drop-down list, select the cells, choose Data > Data Validation, set Allow to List, and…
- Excel Date Difference Formulas for Days, Months, and YearsTo find the number of elapsed days between two dates in Excel, subtract the start date from the…
- NetSuite Saved Search Formula Examples and TipsNetSuite saved search formulas let you calculate, classify, format, and filter search results with SQL-style expressions, usually using…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.