calculating results in formulas

G

Guest

I am trying to do some calculate differences between results in columns
containing a mix of negative or postive numbers. I can't seem to write the
formula to display the results that are expected.

So far....I get the correct answer but all are postive results, and I can
add the minus sign, but then get only negative results. When summing the
answer columns results...then the difference is inflated.

For example: (0.33)-(0.37)=0.04 and 12.28-9.72=(2.56)

I would like the formula to take a negative number subtract another negative
number and display the result as a positive AND the same formula to take a
positive number and subtract another postive number and display the result as
negative.

Thanks for your help.
 
B

Bob Phillips

So positive - positive is negative (regardless of true sign)?

And negative - negative is positive (regardless of true sign)?

What about positive - negative and negative - positive?

And why?
 
L

Lewis Clark

When you subtract a positive number from another positive number (or a
negative from a negative), the result can be positive OR negative depending
on the relative sizes of the two numbers.

In your examples, I assume the () indicate negative numbers. Your first
example correctly shows the answer is + .04, but in your second example, the
correct result is + 2.56, not - 2.56 (since 12.28 is larger than 9.72).

Please post some sample data and explain in more detail what you are trying
to do.
 
G

Guest

Hi Bob,
Yes, regardless of the true sign, but there should not be any occurances of
positive-negative or negative-positive.

To answer the why...I am comparing the actual amount either discounted or
paid vs. amount that should have been discounted or paid and the difference
to display as we are owed or we owe.

Thanks
Linda

Bob Phillips said:
So positive - positive is negative (regardless of true sign)?

And negative - negative is positive (regardless of true sign)?

What about positive - negative and negative - positive?

And why?
 
G

Guest

Hi Lewis,

You are correct about the () and the actual results.

In the example of (.33)-(.37)=.04 I am showing a discount taken (.33) - the
discount that should have been taken (.37) resulting in .04 or what we are
owed and displayed as postive.

In the example of 12.28-9.72=(2.56) I am showing a payment made 12.28 - the
payment that should have been paid 9.72 and would like the result to display
as a negative (2.56) or what we owe.

Since both types of data are gathered from the same fields, I need a way to
download, do the comparisions for each record and calculate the differences
for each and a total we either owe or are owed for all records.

So far I can only end up with either all positive or all negative results.
So any help is appreciated.

Thanks.
Linda


Lewis Clark said:
When you subtract a positive number from another positive number (or a
negative from a negative), the result can be positive OR negative depending
on the relative sizes of the two numbers.

In your examples, I assume the () indicate negative numbers. Your first
example correctly shows the answer is + .04, but in your second example, the
correct result is + 2.56, not - 2.56 (since 12.28 is larger than 9.72).

Please post some sample data and explain in more detail what you are trying
to do.
 
B

Bob Phillips

Okay, so why not just use

=-(A1-B1)

where A1 and B1 hold the 2 numbers.

--
HTH

Bob Phillips

Linda said:
Hi Bob,
Yes, regardless of the true sign, but there should not be any occurances of
positive-negative or negative-positive.

To answer the why...I am comparing the actual amount either discounted or
paid vs. amount that should have been discounted or paid and the difference
to display as we are owed or we owe.

Thanks
Linda
 
L

Lewis Clark

To change the sign, remove the negative sign right after the equal sign (or
add it if you overlooked it - it is hard to see).
 
L

Lewis Clark

To keep the .04 positive (assume .33 is in cell A1 and .37 is in cell B1),
then in C1 (or wherever) put:
= B1 - A1

Same thing with the other data. Change the order of the subtraction to
change the sign.


Linda said:
Hi Lewis,

You are correct about the () and the actual results.

In the example of (.33)-(.37)=.04 I am showing a discount taken (.33) -
the
discount that should have been taken (.37) resulting in .04 or what we are
owed and displayed as postive.

In the example of 12.28-9.72=(2.56) I am showing a payment made 12.28 -
the
payment that should have been paid 9.72 and would like the result to
display
as a negative (2.56) or what we owe.

Since both types of data are gathered from the same fields, I need a way
to
download, do the comparisions for each record and calculate the
differences
for each and a total we either owe or are owed for all records.

So far I can only end up with either all positive or all negative results.
So any help is appreciated.

Thanks.
Linda
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top