SUBTRACT
The SUBTRACT function returns the difference of all values in the arguments.
Syntax
SUBTRACT(value1, ...valueN?) - > number
Arguments
value1
Number/Node reference
The first node or number to be subtracted. This is a required argument.
...valueN?
Number/Node reference
The additional nodes or numbers to be subtracted. These are optional arguments.
Example
Consider the below example where we have Revenue and expenses data. The objective is to calculate the profit.
Revenue
300
450
367
408
832
671
700
260
572
903
534
671
Sales
180
200
238
174
286
319
265
136
220
260
300
315
Other revenue
120
250
129
234
546
352
435
124
352
643
234
356
Expenses
170
173
360
264
174
184
582
273
503
296
295
484
Rent
50
50
50
50
50
50
50
50
50
50
50
50
Other expenses
120
123
310
214
124
134
532
223
453
246
245
434
To achieve this, the following formula should be written in the [Profit] node.
SUBTRACT
(
[Revenue]
,
[Expenses]
)
Result
Profit
130
277
7
144
658
487
118
-13
69
607
239
187
Last updated