Help with formulae please

J

John Holt

Hi all, I have 3 columns, BUY SELL RESULT
Sometimes sell is greater than buy and sometimes buy is greater than sell.
I wish to have a formulae in column RESULT that will calculate both of the
above situations.ie sometimes sell minus buy and sometimes buy minus sell
depending which is the greater of the two

Thanks in advance

John Holt
 
S

Socrates

Perhaps I don't understand the problem.

Bernard's first solution will result in plus or minus, depending on
whether buy or sell is higher. His second solution will always result
in plus. What do you want?
 
J

John Holt

Perhaps I don't understand the problem.

Bernard's first solution will result in plus or minus, depending on
whether buy or sell is higher. His second solution will always result
in plus. What do you want?

Hi Socrates I have copied and pasted Bernard's first example.
I have inserted 3 and 6 into A1 and A2 with A3 resulting in 3 which is
correct.
I then inserted 6 into A1 and 3 into A2 and A3 resulted in 3 which I
expected to see minus 3

perhaps I have explained my original request incorrectly
thanks again

John
 
B

Bernard Rey

John Holt a écrit :
Thanks Bernard for such a quick response however your formulae don't
differentiate between plus or minus

When you wrote:
" sell minus buy and sometimes buy minus sell depending which is the
" greater of the two

I thought you wanted to have the absolute difference. If you want to have a
minus sign, I think the simple =A1-B1 should be enough then.

I'll back J Laroche's reply and say that I don't understand what you want to
have. Could you give an example of what you want to have.
 
J

John Holt

Hi Bernard, sorry for the confusion, here is what I require
Column A named Buy, column B named Sell , column C named Result
If A =3 and B = 6 then C would calculate to minus3
If A =6 and B =3 then C would calculate to 3
Is this more clear

Thanks again for your help

John
 
B

Bernard Rey

John Holt:
Hi Bernard, sorry for the confusion, here is what I require
Column A named Buy, column B named Sell , column C named Result
If A =3 and B = 6 then C would calculate to minus3
If A =6 and B =3 then C would calculate to 3
Is this more clear

In that case, as mentioned in my previous post, the answer is the classic
"=A1-B1" formula. But this seems so basic I can't believe you haven't
figured it out...


---------------------------------------------------------
Please reply to the newsgroup, and within the same thread.
Merci de répondre au groupe, et dans l'enfilade.

--
Bernard Rey - Toulouse / France
MVP - office:macintosh http://faq.office.macintosh.free.fr


 
J

John Holt

John Holt:


In that case, as mentioned in my previous post, the answer is the classic
"=A1-B1" formula. But this seems so basic I can't believe you haven't
figured it out...


I had, just had it back to front, bit dyslexic at present

Thanks very much for your assistance
 
S

Socrates

Yes, I see it's solved. Like Bernard, I rushed to a more complex
forumula and my previous message is incorrect.
 

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