Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 78
Default How to get -ve from +ve calculation?

I need to calculate margin required for trading,
if there is 1 buy & 1 sell, I need result as 1 & -1,
for example:

cell
A7 buy B7 1
A9 buy B9 1
A10 sell B10 2

So far my formula in cell H10 is :
=IF(OR(A10="buy",A10="sell"),ROUND(((H$3*B10)*1000 *0.05)*C10,2)," ")

how do I make it work to give me a -ve result? please help.

Thanks.
Mukesh

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,203
Default How to get -ve from +ve calculation?

Just put a - sign in front of the word ROUND, as

=IF(OR(A10="buy",A10="sell"),-ROUND(((H$3*B10)*1000*0.05)*C10,2)," ")

But I'm not sure your OR statement is correct. Can you just write out how
things should work, like
If A10="buy" or A10="sell" then do this math (formula here)
but if A10 is not either buy or sell, then put a blank space there.

Reason I think the OR may be wrong is that you talk about having 1 buy and 1
sell and needing 1 and -1 results and I am thinking that you really want two
different cells referenced in it, as
=IF(AND(A10="buy",A11="sell"),ROUND(((H$3*B10)*100 0*0.05)*C10,2)," ")
but I just am not certain of exactly what you are looking for.

"Mukesh" wrote:

I need to calculate margin required for trading,
if there is 1 buy & 1 sell, I need result as 1 & -1,
for example:

cell
A7 buy B7 1
A9 buy B9 1
A10 sell B10 2

So far my formula in cell H10 is :
=IF(OR(A10="buy",A10="sell"),ROUND(((H$3*B10)*1000 *0.05)*C10,2)," ")

how do I make it work to give me a -ve result? please help.

Thanks.
Mukesh

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi threaded calculation (multi CPU) - impact on calculation spe Pascal[_2_] Excel Discussion (Misc queries) 1 December 3rd 08 10:46 AM
If Calculation skateblade Excel Worksheet Functions 4 May 31st 06 12:03 PM
Age calculation Clash Excel Discussion (Misc queries) 5 March 17th 06 07:16 PM
How do I use a rounded calculation result in another calculation? vnsrod2000 Excel Worksheet Functions 1 January 26th 05 10:11 PM
How do I use a rounded calculation result in another calculation? vnsrod2000 Excel Worksheet Functions 1 January 26th 05 09:36 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"