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:

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
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.
 
Upvote 0
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))))
 
Upvote 0
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))))
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,214,897
Messages
6,122,148
Members
449,066
Latest member
Andyg666

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