spacesuf.blogg.se

Excel formula for subtracting one column from another
Excel formula for subtracting one column from another





excel formula for subtracting one column from another

The key point is to lock the reference for the cell to be subtracted with the $ sign. To subtract one number from a range of cells, enter that number in some cell (F1 in this example), and subtract cell F1 from the first cell in the range: Subtract the same number from a column of numbers To subtract 2 columns row-by-row, write a minus formula for the topmost cell, and then drag the fill handle or double-click the plus sign to copy the formula to the entire column.Īs an example, let's subtract numbers in column C from the numbers in column B, beginning with row 2:ĭue to the use of relative cell references, the formula will adjust properly for each row: So, make all the numbers you want to subtract negative (for this, simply type a minus sign before a number), and then use the SUM function to add up the negative numbers: To make your formula more compact, add up the subtrahends (B2:B6) using the SUM function, and then subtract the sum from the minuend (B1):Īs you may remember from a math course, subtracting a negative number is the same as adding it. Simply type several cell references separated by a minus sign like we did when subtracting multiple numbers.įor example, to subtract cells B2:B6 from B1, construct a formula in this way:

excel formula for subtracting one column from another

To subtract multiple cells from the same cell, you can use any of the following methods. How to subtract multiple cells from one cell in Excel

excel formula for subtracting one column from another

Press the Enter key to complete your formula.Īnd you will have a result similar to this:.Click on the cell containing a subtrahend (a number to be subtracted) to add its reference to the formula (B2).Its reference will be added to the formula automatically (A2). Click on the cell containing a minuend (a number from which another number is to be subtracted).In the cell where you want to output the difference, type the equals sign (=) to begin your formula.You do not necessarily have to type cell references manually, you can quickly add them to the formula by selecting the corresponding cells. For example, to subtract the number in B2 from the number in A2, use this formula:







Excel formula for subtracting one column from another