IF statement with multiple criteria

swatty27

New Member
Joined
Nov 2, 2011
Messages
5
Hi there, was wondering if I could get help with an If statement I was trying to perform. I was trying to sort through to columns which are either buy/sell in on column and put/call in the other for four different possiblities:

Buy Put (BP), Buy Call(BC), Sell Put(SP), Sell Call(SC)

The formula I tried to utilize is below:

=IF(AND(Y6=$Y$2,Z6=$Z$2),BP,IF(AND(Y6=$Y$3,Z6=$Z$3),SC,IF(AND(Y6=$Y$3,Z6=$Z$2),SP,IF(AND(Y6=$Y$2,Z6=$Z$3),BC))))

The cell references I put in the formula were cells with the words Buy,Sell, Put and Call. This is using Excel 2007.

Any help would be appreciated.

Thanks,

Dan
 
Last edited:

Some videos you may like

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

buxtongt

Well-known Member
Joined
Oct 5, 2011
Messages
709
Welcome to the board. I tested your formula a little and I believe you need =true after all of the and statements. Hope this helps.
 

swatty27

New Member
Joined
Nov 2, 2011
Messages
5
I tried doing this but was unsuccessful, am I placing the =true part incorrectly? Where exactly is it supposed to go? Thanks I appreciate the help.

=IF(AND(Y7=$Y$3,Z11=$Z$3,=TRUE),BP,IF(AND(Y11=$Y$4,Z11=$Z$4,=TRUE),SC,IF(AND(Y11=$Y$5,Z11=$Z$3,=TRUE),SP,IF(AND(Y11=$Y$3,Z11=$Z$4,=TRUE),BC))))
 

swatty27

New Member
Joined
Nov 2, 2011
Messages
5
Hmmm it still didn't work when I tried doing this:

=IF(AND(Y7=$Y$3,Z11=$Z$3)=TRUE,BP,IF(AND(Y11=$Y$4,Z11=$Z$4)=TRUE,SC,IF(AND(Y11=$Y$5,Z11=$Z$3)=TRUE,SP,IF(AND(Y11=$Y$3,Z11=$Z$4)=TRUE,BC))))
 

buxtongt

Well-known Member
Joined
Oct 5, 2011
Messages
709
Are the ranges you are looking at and comparing to set correctly? Some of them look off, Y7 vs. Y11 and $Y$3-5 specifically. Thanks.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,469
Messages
5,596,326
Members
414,053
Latest member
Dual Showman

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
Top