How to Multiply 2 Lines in Excel: Step-by-Step Guide
In this article
To multiply two lines (rows) in Excel, you use a simple formula that references the cells in each row and multiplies them with the asterisk (*) operator. For example, if row 1 has values in A1 and B1, and row 2 has values in A2 and B2, you can enter =A1*A2 in a new cell to multiply the first line's value by the second line's value. If you want to multiply corresponding cells across two rows (like A1 times A2, B1 times B2, and so on), you can use =A1*A2 in a cell and drag it across, or use an array formula like =A1:C1*A2:C2 in modern Excel. This guide walks you through both approaches, plus common pitfalls and fixes.
What You'll Need
- Microsoft Excel (any recent version: Microsoft 365, Excel 2019, 2021, or Excel for Mac). The steps below work in both Windows and Mac desktop versions; the web version works similarly but some array formula behavior may differ.
- Two rows of numeric data in your worksheet. Text or blank cells will cause errors or zero results.
- A blank cell or row where you want the results to appear.
Step-by-Step
- Open your workbook and locate the two lines (rows) you want to multiply. For this example, assume row 1 contains values in A1, B1, and C1, and row 2 contains values in A2, B2, and C2.
- Click an empty cell where you want the first result to appear — for example, A3.
- Type the multiplication formula for the first pair of cells:
=A1*A2. Press Enter. The cell now shows the product of the two values. - Copy the formula across the row. Click the cell with the formula (A3), then drag the small square in the bottom-right corner (the fill handle) across to C3. Excel adjusts the references automatically, so B3 becomes
=B1*B2and C3 becomes=C1*C2. This multiplies each corresponding pair of cells from the two lines. - Alternatively, use an array formula to multiply both rows in one step. Select a range of three cells in an empty row (for example A4:C4), type
=A1:C1*A2:C2, and press Ctrl+Shift+Enter in older Excel versions, or just Enter in Microsoft 365 and Excel 2021+ (which support dynamic arrays). The result spills the three products into the selected cells. - Check your results. Verify that each product is correct by manually multiplying one pair (e.g., A1 times A2) with a calculator. If a result looks wrong, inspect the formula in the formula bar to confirm the cell references point to the intended rows.
- Format if needed. Select the result cells and apply number formatting (Home > Number) to show decimals, currency, or thousands separators as appropriate.
Common Mistakes
- Using the wrong operator. The multiplication symbol in Excel is the asterisk (*), not the letter x or the × symbol. Typing
=A1xA2will produce an error. - Mixing text and numbers. If either cell contains text (even a number stored as text), Excel returns a #VALUE! error. Check that cells are formatted as General or Number, not Text.
- Forgetting absolute references when needed. If you plan to copy a formula that should always multiply by a fixed cell (like a tax rate), use
$to lock the reference (e.g.,=A1*$B$1). Otherwise the reference shifts and gives wrong results. - Assuming array formulas work everywhere. In older Excel versions, array formulas require Ctrl+Shift+Enter. In Excel for the web, dynamic array behavior may differ; test before relying on it.
- Selecting the wrong range. When using an array formula, the selected output range must match the size of the input ranges, or you'll get a #N/A or spill error.
Tips
- Use the fill handle (the small square at the bottom-right of a selected cell) to copy formulas quickly across rows or down columns.
- Press F2 to edit a cell and see which cells are referenced; Excel color-codes the references.
- If you frequently multiply two rows, consider using the SUMPRODUCT function for a single total:
=SUMPRODUCT(A1:C1,A2:C2)multiplies each pair and sums the results. - Name your ranges (Formulas > Define Name) to make formulas easier to read, e.g.,
=Row1*Row2. - Use Paste Special > Multiply to multiply a range of cells by a constant value without writing formulas.
Troubleshooting
If your multiplication formula returns an error or unexpected result, work through these checks in order:
- #VALUE! error: One of the referenced cells contains text or is blank. Select each cell and confirm it's a number. Use
=ISNUMBER(A1)to test. - Result is 0: One cell may be empty or contain 0. Check both cells.
- Formula shows as text: The cell may be formatted as Text before you typed the formula. Change the format to General, then re-enter the formula.
- Array formula doesn't spill: In older Excel, you must press Ctrl+Shift+Enter. In Microsoft 365, ensure the output range is empty; if cells below or to the right are occupied, you'll get a #SPILL! error. Clear the blocking cells.
- Wrong references after copying: Check for missing
$signs. Use absolute references where needed. - Excel not calculating: Go to Formulas > Calculation Options and ensure Automatic is selected. Press F9 to force a recalculation.
Frequently Asked Questions
Can I multiply two entire rows without creating a new row for results?
No, Excel needs a destination for the results. You can place results in a new row, a new column, or another sheet. You cannot overwrite the original rows with the product unless you use a macro or Paste Special, which is not recommended for dynamic data.
What's the difference between =A1*A2 and =SUMPRODUCT(A1:C1,A2:C2)?
=A1*A2 multiplies two single cells. =SUMPRODUCT(A1:C1,A2:C2) multiplies each pair of cells in the two ranges and then adds the products together, giving a single total.
Why does my array formula return a #VALUE! error?
This usually means one of the ranges contains text or blank cells. Ensure all cells in both rows contain numbers. Also confirm you entered the formula correctly with Ctrl+Shift+Enter if using an older Excel version.
Can I multiply rows from different worksheets?
Yes. Reference the sheet name followed by an exclamation mark, e.g., =Sheet1!A1*Sheet2!A2. For ranges, use =Sheet1!A1:C1*Sheet2!A1:C1 as an array formula.
Does multiplying two rows work in Excel for the web?
Basic multiplication formulas like =A1*A2 work fine. Dynamic array formulas may behave differently; if you encounter issues, use individual formulas per cell instead.
How do I multiply a row by a single number?
Use an absolute reference: =A1*$B$1 and copy across. Or use Paste Special > Multiply: copy the number, select the row, right-click > Paste Special > Multiply.