PDA

View Full Version : What is the function of minus



Nader
02-18-2008, 06:39 AM
This code to sum the values in the column A

Cells(1, 2).Formula = "=SUM(A:A)"


Waht is the code or function to minus the values

Bob Phillips
02-18-2008, 07:01 AM
Tricky!



Cells(1, 2).Formula = "=-SUM(A:A)"

Nader
02-18-2008, 07:14 AM
The result of plus for this values 1,2,4 is 7
The result of minus for this values 1,2,4 is 1

but your code show this result -7 its' not as I want 1

Bob Phillips
02-18-2008, 07:23 AM
You obviously went to a different school than me.

Nader
02-18-2008, 08:00 AM
Any way thank you

AAM
02-18-2008, 08:08 AM
The result of plus for this values 1,2,4 is 7
The result of minus for this values 1,2,4 is 1

but your code show this result -7 its' not as I want 1
How is the Sum function supposed to know which values are to be added (4) and which are to be subtracted (1,2)?