ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF Statement (https://www.excelbanter.com/excel-worksheet-functions/190580-if-statement.html)

Kingdom

IF Statement
 
I'm trying to setup a transaction report that keeps track of the total
transaction cost plus/minus fees. In my excel sheet I have quantity, price,
type (buy/sell), status (executed) and a total column.

In the total column, the formula I'm looking for is "if E5="executed" then
quantity*price + buy or quantity*price-sell)

The TRUE argument is "executed", if "executed" then buy or sell is true. The
argument is FALSE if "executed" is not in the parameter.

Any suggestions?



Bernard Liengme

IF Statement
 
Not very clear:

Is this the scenario:
IF E5 = "executed" then
F5 gets price*quantity
ELSE
F5 gets nothing
END if
Then use =IF(D5="executed",, A5*B5 ,"")
-----------------------------
But if buy and sell come into play
IF E5 = "executed" then
IF c5 = "buy: then
F5 gets price*quantity
ELSE
F5 gets price*quality ' but here is
only one price field !
END IF
ELSE
F5 gets nothing
END if

=IF(D5="executed",IF(C5="buy",A5*B5,A5*B5),"") ' same answer no
matter what is in C5 !

best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme

"Kingdom" wrote in message
...
I'm trying to setup a transaction report that keeps track of the total
transaction cost plus/minus fees. In my excel sheet I have quantity,
price,
type (buy/sell), status (executed) and a total column.

In the total column, the formula I'm looking for is "if E5="executed" then
quantity*price + buy or quantity*price-sell)

The TRUE argument is "executed", if "executed" then buy or sell is true.
The
argument is FALSE if "executed" is not in the parameter.

Any suggestions?




FSt1

IF Statement
 
hi
can we see examples of the data.
also what results are you expecting if true and what results are you
expecting if false.
i may be confused but there may be a problem with this part...
if (E5="executed" then quantity*price + buy or quantity*price-sell)

regards
FSt1

"Kingdom" wrote:

I'm trying to setup a transaction report that keeps track of the total
transaction cost plus/minus fees. In my excel sheet I have quantity, price,
type (buy/sell), status (executed) and a total column.

In the total column, the formula I'm looking for is "if E5="executed" then
quantity*price + buy or quantity*price-sell)

The TRUE argument is "executed", if "executed" then buy or sell is true. The
argument is FALSE if "executed" is not in the parameter.

Any suggestions?




All times are GMT +1. The time now is 03:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com