To copy a formula horizontally in Excel, select the cell that contains it and drag the small fill handle at the cell’s bottom-right corner across the destination cells. You can also select the whole range and choose Home > Fill > Right, or use Ctrl+R on Windows. Excel copies the formula and adjusts relative cell references for each column.
What You’ll Need
- An Excel workbook with a formula in the first cell of the row you want to fill.
- A clear idea of how the formula’s references should change as it moves across columns.
- Destination cells that are available to receive the copied formula. Existing entries in those cells may be overwritten.
The directions below are for Excel for Microsoft 365 on Windows. The fill handle and ribbon commands are also available in Excel for Mac and Excel for the web, though keyboard shortcuts can differ. Save your workbook first if the destination cells contain anything you may need to keep.
Step-by-Step
- Check the starting formula and its references. Click the cell containing the formula and look at the formula bar. For example, with monthly values in B1:G1 and a row of calculations in B2:G2, enter a formula in B2 that multiplies the value above it by 1.1:
=B1*1.1. This example assumes the value for the first month is in B1 and the calculation should use the value directly above it. Confirm that the displayed result is sensible before filling right. If the formula already exists, inspect its cell references rather than replacing it. - Choose the destination range. Decide how many columns should receive the formula. If the formula begins in B2 and you want it through G2, the full range is B2:G2. You can fill only part of a row, such as B2:D2, if you do not want to change the remaining cells. Check the destination cells before continuing: a fill operation replaces their contents with formulas based on the first cell.
- Drag the fill handle for a quick copy. Select the formula cell. Find the tiny square at the bottom-right corner of its selection border; this is the fill handle. Point to it until the pointer becomes a small black plus sign, then press and hold the mouse button and drag right across the destination cells. Release when the outline covers the final cell you want to fill. In the example, dragging from B2 through G2 copies the calculation across six columns.
- Check the results and adjusted references. Click one of the filled cells and inspect the formula bar. With values in B1:G1 and the calculation in B2:G2, the formula in C2 should refer to C1, while the formula in G2 should refer to G1. The formula at the end of the example range is
=G1*1.1. Each column calculates from the value above it, rather than reusing the original B1 reference. Compare a few results with your intended logic before relying on the full row. - Use Fill Right for an exact range. If dragging is awkward, select the range from the formula cell to the final destination, including the starting cell. For example, select B2:G2 when B2 contains the formula. On Windows, press Ctrl+R. Alternatively, on the ribbon choose Home > Fill > Right. Excel fills the selected cells to the right using the formula in the leftmost cell. Selecting only C2:G2 will not include B2 as the source, so include the formula cell in the selection.
- Copy and paste when you need more control. Select the formula cell and press Ctrl+C on Windows. Select the destination range, then press Ctrl+V. This copies the formula along with the cell’s formatting and other copied content. To paste formulas without carrying over the source formatting, use Home > Paste > Formulas if that option is shown in your Excel ribbon. Check the result because relative references still adjust when a formula is pasted into a different column.
- Use the menu on Mac or Excel for the web if needed. If a shortcut behaves differently on your device, select the source and destination range and use Home > Fill > Right where that command is available. On a Mac, the fill handle works the same way: drag it right across the cells. In Excel for the web, you can also drag the fill handle or use the ribbon. Make sure the range includes the source formula; a browser or system shortcut may not match the Windows shortcut.
After filling, verify both the last destination cell and at least one cell in the middle. A correct-looking first result does not guarantee that every reference moved as intended, especially when the formula contains fixed or mixed references.
Common Mistakes
- Using the wrong reference type. Excel normally adjusts relative references as a formula moves. That is useful when each column should use its own input, but it can be wrong when every formula must point to one fixed cell. To lock both the column and row, use dollar signs: with a fixed rate in B1 and a calculation starting in C2, a formula that multiplies C1 by the fixed rate is
=C1*$B$1. This example assumes B1 must remain the rate cell as the formula is copied horizontally. When copied one column right, the reference to the input shifts to D1, while $B$1 stays fixed. - Including the wrong cells in the selection. Fill Right uses the leftmost cell in the selected range as its source. If you select a blank cell before the formula, the result may be blank or unexpected. Include the formula cell at the far left and only the destination cells you intend to change.
- Dragging the cell border instead of the fill handle. The fill handle is the tiny square in the selection’s bottom-right corner. Dragging the border can move the cell instead of copying its formula. If the formula moves, press Ctrl+Z on Windows immediately, then select the cell and try again using the small corner handle.
- Copying formats or overwriting data unintentionally. Ordinary copy and paste can bring formatting with the formula, and both paste and Fill Right replace destination contents. Review the target range first. Use the formulas-only paste option if you need to preserve destination formatting.
- Expecting a formula to stay identical in every column. A relative reference such as A1 changes when copied. If a reference should stay fixed, add dollar signs to the appropriate row, column, or both. Mixed references, such as $A1 or A$1, lock only one part and are useful when formulas move across and down a grid.
Tips
- Use F4 while editing references on Windows. In the formula bar or while editing a formula, select a cell reference and press F4 to cycle through relative, absolute, and mixed forms. On some laptops you may need Fn+F4. On Mac, the function-key behavior depends on keyboard settings; you can type the dollar signs directly if needed.
- Plan for both directions in a table of calculations. When a formula will be filled across columns and down rows, decide which row or column must remain fixed. For example, a fixed header row may need a reference such as B$1, while a fixed input column may need $A2. Test the formula in one cell to the right and one cell below before filling a larger block.
- Use the Name Box for long ranges. The Name Box is to the left of the formula bar. Type a range such as B2:G2 there and press Enter to select it, then choose Home > Fill > Right. This avoids dragging across a long row and makes it easier to select an exact range.
- Preserve destination formatting deliberately. Fill Right generally carries the source cell’s formula and may also carry formatting, depending on the operation and Excel settings. If formatting matters, test a small range first or use the formulas-only paste command. Check number formats too: a copied formula can calculate correctly while its result appears as a date, percentage, or rounded number because of formatting.
- Be cautious with spilled formulas and merged cells. Dynamic-array formulas that spill results into neighboring cells are not ordinary formulas to copy across one cell at a time. A spill range may block edits in its destination cells. Merged cells can also prevent a fill from covering a regular row of cells. Unmerge cells where appropriate, or use the formula’s intended spill behavior rather than filling it manually.
Troubleshooting
The cells repeat the same answer. Check whether the formula uses absolute references, such as $B$1, for a reference that should move. If each column needs its own input, remove the dollar signs from that reference. If only the row or column should stay fixed, adjust just that part rather than changing every reference.
The formula changes, but points to the wrong cells. Compare the source and destination formulas in the formula bar. Relative references move by the same number of columns as the formula. If the formula should use a fixed rate or header, make that reference absolute or mixed. Undo with Ctrl+Z on Windows if the fill has overwritten cells, then correct the original formula and fill again.
The fill handle is missing or does not work. Confirm that you have selected one cell and that the pointer is on the small square at its lower-right corner. Excel may have fill-handle dragging disabled: in Windows, open File > Options > Advanced and look under Editing options for Enable fill handle and cell drag-and-drop. If you cannot change the setting, use Home > Fill > Right instead. On Mac, check Excel’s preferences for editing or drag-and-drop options; menu names can vary by release.
Excel will not fill the selected range. Look for merged cells, protected-sheet restrictions, or cells occupied by a spilled array formula. A protected sheet may prevent editing unless you have permission or the relevant cells are unlocked. If the selection is filtered or part of a special range, try selecting a simple, unmerged row first and filling a short test range.
Ctrl+R does something else. Confirm that you are using Excel for Windows and that the worksheet range, including the source cell, is selected. Shortcuts may be intercepted by another application or differ on Mac and in a browser. Use the ribbon command Home > Fill > Right to avoid relying on a keyboard shortcut.
Frequently Asked Questions
Does Excel automatically change cell references when I copy a formula across?
Yes. Relative references move with the formula. For instance, a reference to B1 copied one column right becomes a reference to C1. Absolute references with dollar signs stay fixed, while mixed references lock only the row or column marked with a dollar sign.
What is the shortcut to fill a formula to the right?
In Excel for Microsoft 365 on Windows, select the range with the formula in its leftmost cell and press Ctrl+R. You can use Home > Fill > Right instead. If you are on Mac or Excel for the web, use the ribbon command or drag the fill handle when the shortcut is uncertain.
Can I copy a formula without copying its formatting?
Yes. Copy the cell, select the destination, then use the Formulas option in the Home > Paste menu where available. The formula will still adjust relative references, but the destination formatting is retained rather than replaced by the source formatting.
How do I copy the exact same formula across every column?
Lock the references that must not change with dollar signs. A reference such as $B$1 remains fixed in every direction, while a reference such as B1 shifts as the formula moves. Use mixed references if only the row or column needs to stay fixed, and verify a copied cell before filling the whole range.
Can I fill a formula horizontally in Excel for the web?
Yes. Select the formula cell and drag its fill handle to the right, or select a range that includes the formula cell and use Home > Fill > Right if the command is available. Check the copied references and results just as you would in the desktop version.
Related
- How to Make Cell Borders White in Microsoft Excel 365
- How to Make a Number Superscript in Excel
- How to Make a Number Negative in Excel: Three Methods
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Power Query Find Text in a String: M Functions and ExamplesTo find whether a Power Query text value contains a word or phrase, use Text.Contains. In a Custom…
- VLOOKUP Between Two Sheets: Examples and Common FixesTo use VLOOKUP across two Excel sheets, put the lookup value on one sheet and the data table…
- Excel IFS Function Examples for Multiple ConditionsExcel’s IFS function checks conditions in order and returns the value paired with the first condition that is…
- Excel MIN and MAX in the Same Formula: Examples and TipsYes. In Excel for Microsoft 365 on Windows, you can calculate both endpoints in one formula, such as…
- Excel Day Name from Date: Formulas, Formats, and FixesTo show the day name for a date in Excel, enter =TEXT(A2,"dddd") in another cell, assuming A2 contains…
- Excel Formula for Time Difference: Examples and FixesTo find the time between two values in Excel, subtract the start time from the end time: with…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.