Monday, December 17, 2018

Multiply a column of numbers by the same number

Multiply a column of numbers by the same number

Suppose you want to multiply a column of numbers by the same number in another cell. The trick to multiplying a column of numbers by one number is adding $ symbols to that number's cell address in the formula before copying the formula.

In our example table below, we want to multiply all the numbers in column A by the number 3 in cell C2. The formula =A2*C2 will get the correct result (4500) in cell B2. But copying the formula down column B won't work, because the cell reference C2 changes to C3, C4, and so on. Because there's no data in those cells, the result in cells B3 through B6 will all be zero.

Data in column A, formulas in column B, and the number 3 in cell C2

To multiply all the numbers in column A by cell C2, add $ symbols to the cell reference like this: $C$2, which you can see in the example below.

Numbers in column A, formula in column B with $ signs, and the number 3 in column C

Using $ symbols tells Excel Online that the reference to C2 is "absolute," so when you copy the formula to another cell, the reference will always be to cell C2.

To create the formula

  1. In cell B2, type an equal (=) sign.

  2. Click cell A2 to enter the cell in the formula.

  3. Enter an asterisk (*).

  4. Click cell C2 to enter the cell in the formula.

  5. Now type a $ symbol in front of C, and a $ symbol in front of 2: $C$2.

  6. Press Enter.

Now we'll step back a bit to see an easy way to copy the formula down the column after you press Enter in cell B2.

  1. Select cell B2.

  2. Double-click the small green square in the lower-right corner of the cell.

The formula automatically copies down through cell B6.

A square green box in the lower right corner of cell B2

And with the formula copied, column B returns the correct answers.

Column a multiplied by cell C2, with results in column B

No comments:

Post a Comment