ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   how can I subtract the contents of several cells (https://www.excelbanter.com/new-users-excel/11404-how-can-i-subtract-contents-several-cells.html)

whiteteeth

how can I subtract the contents of several cells
 
I know that by entering SUM=(b1:d1) in the formula bar, this will add the
contents of these cells. How can I do this with subtraction without entering
=(b1-c1-d1)? Thanks!

JE McGimpsey

One way:

=B1-SUM(C1:D1)

Alternatively, you could array-enter (CTRL-SHIFT-ENTER or CMD-RETURN):

=SUM(B1,-C1:D1)

Note that the second solution won't ignore text.

In article ,
"whiteteeth" wrote:

I know that by entering SUM=(b1:d1) in the formula bar, this will add the
contents of these cells. How can I do this with subtraction without entering
=(b1-c1-d1)? Thanks!


Harlan Grove

JE McGimpsey wrote...
....
Alternatively, you could array-enter (CTRL-SHIFT-ENTER or CMD-RETURN):

=SUM(B1,-C1:D1)

Note that the second solution won't ignore text.

....

=-SUM(-B1,C1:D1)

will avoid the need for array entry and will only fail to ignore text
in B1. This is an old (REAL OLD) 123 trick.


JE McGimpsey

So old that it should have been second nature to me...

In article . com,
"Harlan Grove" wrote:

=-SUM(-B1,C1:D1)

will avoid the need for array entry and will only fail to ignore text
in B1. This is an old (REAL OLD) 123 trick.



All times are GMT +1. The time now is 06:54 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com