Test 2 conditions where second condition has 2 possibles?

johobie

New Member
Joined
Jan 28, 2022
Messages
24
Office Version
  1. 365
Platform
  1. Windows
Hi, how do I test 2 conditions where one condition has 2 possibles?

In Row _ , IF Column A contains "CALL", AND Column B contains "Buy" or "Acquisition", enter result in Column F
ABCDEFResult
Buycompany140157.870(6,321.80)
CALLBuyCALL-100 ADSK'20 JA@175 OPENING TRANSACTION EXPIRES ON JAN 17,2020 JK-20018745.500(2,212.00)
(2,212.00)​
CALLSellCALL-100 HRTX'20 SP@25 CLOSING TRANSACTION EXPIRES ON SEP 18,2020 LH-231912(20)0.6001,167.97
PUTBuyPUT -100 XLNX'19 OC@105 OPENING TRANSACTION EXPIRES ON OCT 18,2019 UJ-19118326.450(3,872.50)
PUTSellPUT -100 AAL'20 JN@6 OPENING TRANS - UNCOVERED EXPIRES ON JUN 19,2020 JB-240045(2)0.51092.49
CALLAcquisitionCALL-100 AAPL'19 SP@35 CLOSING TRANSACTION EXPIRES ON OCT 02,2020 LT-34092331(2,197.00)
(2,197.00)​
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Book1
ABCDEFGH
2Result
3Buycompany140157.87-6,321.80
4CALLBuyCALL-100 ADSK'20 JA@175 OPENING TRANSACTION EXPIRES ON JAN 17,2020 JK-20018745.5-2,212.00-2212
5CALLSellCALL-100 HRTX'20 SP@25 CLOSING TRANSACTION EXPIRES ON SEP 18,2020 LH-231912-200.61,167.97 
6PUTBuyPUT -100 XLNX'19 OC@105 OPENING TRANSACTION EXPIRES ON OCT 18,2019 UJ-19118326.45-3,872.50 
7PUTSellPUT -100 AAL'20 JN@6 OPENING TRANS - UNCOVERED EXPIRES ON JUN 19,2020 JB-240045-20.5192.49 
8CALLAcquisitionCALL-100 AAPL'19 SP@35 CLOSING TRANSACTION EXPIRES ON OCT 02,2020 LT-34092331-2,197.00-2197
Sheet3
Cell Formulas
RangeFormula
H4:H8H4=IF(AND(A4="CALL",OR(B4="Buy",B4="Acquisition")),F4,"")
 
Upvote 0
Solution
Book1
ABCDEFGH
2Result
3Buycompany140157.87-6,321.80
4CALLBuyCALL-100 ADSK'20 JA@175 OPENING TRANSACTION EXPIRES ON JAN 17,2020 JK-20018745.5-2,212.00-2212
5CALLSellCALL-100 HRTX'20 SP@25 CLOSING TRANSACTION EXPIRES ON SEP 18,2020 LH-231912-200.61,167.97 
6PUTBuyPUT -100 XLNX'19 OC@105 OPENING TRANSACTION EXPIRES ON OCT 18,2019 UJ-19118326.45-3,872.50 
7PUTSellPUT -100 AAL'20 JN@6 OPENING TRANS - UNCOVERED EXPIRES ON JUN 19,2020 JB-240045-20.5192.49 
8CALLAcquisitionCALL-100 AAPL'19 SP@35 CLOSING TRANSACTION EXPIRES ON OCT 02,2020 LT-34092331-2,197.00-2197
Sheet3
Cell Formulas
RangeFormula
H4:H8H4=IF(AND(A4="CALL",OR(B4="Buy",B4="Acquisition")),F4,"")

Thank you! you saved me a lot of time and trial and error.
 
Upvote 0
Book1
ABCDEFGH
2Result
3Buycompany140157.87-6,321.80
4CALLBuyCALL-100 ADSK'20 JA@175 OPENING TRANSACTION EXPIRES ON JAN 17,2020 JK-20018745.5-2,212.00-2212
5CALLSellCALL-100 HRTX'20 SP@25 CLOSING TRANSACTION EXPIRES ON SEP 18,2020 LH-231912-200.61,167.97 
6PUTBuyPUT -100 XLNX'19 OC@105 OPENING TRANSACTION EXPIRES ON OCT 18,2019 UJ-19118326.45-3,872.50 
7PUTSellPUT -100 AAL'20 JN@6 OPENING TRANS - UNCOVERED EXPIRES ON JUN 19,2020 JB-240045-20.5192.49 
8CALLAcquisitionCALL-100 AAPL'19 SP@35 CLOSING TRANSACTION EXPIRES ON OCT 02,2020 LT-34092331-2,197.00-2197
Sheet3
Cell Formulas
RangeFormula
H4:H8H4=IF(AND(A4="CALL",OR(B4="Buy",B4="Acquisition")),F4,"")
Thank you! you saved me a lot of time and trial and error.
 
Upvote 0

Forum statistics

Threads
1,215,268
Messages
6,123,975
Members
449,137
Latest member
yeti1016

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top