ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   If/And/Or Formula Help (https://www.excelbanter.com/excel-worksheet-functions/78057-if-formula-help.html)

carl

If/And/Or Formula Help
 
I tried but cannot get a formula to give me the result.

I am looking for a formula for ColH (Calc) that will do the following:

If Name1 OR Name2 is Fred And Type is A, For Side=Sell (PriceB-Price), For
Side=Buy (Price-PriceB)

Name1 Name2 Side Type Price PriceA PriceB Calc
Fred Blank Buy A 2 2 3 1
Blank Fred Sell A 5 4 6 1

Thank you in advance.



If/And/Or Formula Help
 
Hi

Try this:
=IF(AND(OR(A2="FRED",B2="FRED"),D2="A"),IF(C2="BUY ",G2-E2,IF(C2="SELL",E3-G3,"")))

Andy.

"carl" wrote in message
...
I tried but cannot get a formula to give me the result.

I am looking for a formula for ColH (Calc) that will do the following:

If Name1 OR Name2 is Fred And Type is A, For Side=Sell (PriceB-Price), For
Side=Buy (Price-PriceB)

Name1 Name2 Side Type Price PriceA PriceB Calc
Fred Blank Buy A 2 2 3 1
Blank Fred Sell A 5 4 6 1

Thank you in advance.





All times are GMT +1. The time now is 07:28 AM.

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