Nested IF Integration

andybason

Board Regular
Joined
Jan 7, 2012
Messages
217
Office Version
  1. 2016
Hello

I have the following formula in a spreadsheet:

PHP:
=IF(A6=Controls!$B$3,IF(AD6="CLEAR","CLEAR",IF(AND($AB$5>="5",$AB$5<="6",MyB!$J$2=0,$AA$5="0:0"),"BACK",IF(AND($AB$5>="10",$AB$5<="11",MyB!$J$2=1,$AA$5="0:0"),"BACK",IF(AND($AB$5>="15",$AB$5<="16",MyB!$J$2=2,$AA$5="0:0"),"BACK",IF(AND($AB$5>="20",$AB$5<="21",MyB!$J$2=3,$AA$5="0:0"),"BACK",IF(OR($AA$5<>"0:0",$AC$5="HT"),"LAY")))))),"")

I am trying to amend the final IF to the following but cannot integrate it correctly. Can anyone offer any tips?

PHP:
=IF(AND(AE6="SETTLED",OR($AA$5<>"0:0",$AC$5="HT")),"LAY")

Thank you
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Like this?

=IF(A6=Controls!$B$3,IF(AD6="CLEAR","CLEAR",IF(AND($AB$5>="5",$AB$5<="6",MyB!$J$2=0,$AA$5="0:0"),"BACK",IF(AND($AB$5>="10",$AB$5<="11",MyB!$J$2=1,$AA$5="0:0"),"BACK",IF(AND($AB$5>="15",$AB$5<="16",MyB!$J$2=2,$AA$5="0:0"),"BACK",IF(AND($AB$5>="20",$AB$5<="21",MyB!$J$2=3,$AA$5="0:0"),"BACK",IF(AND(AE6="SETTLED",OR($AA$5<>"0:0",$AC$5="HT")),"LAY")))))),"")
 
Upvote 0
Hello Andrew

Thank you for the reply. I had tried to integrate in the way you suggest but I get an error message which highlights the "OR" part.

Thank you
 
Upvote 0
Thank you Andrew. I have tried it on both 2003 and 2010 versions. I am not trying to add an additional IF but amend an existing one. The formula works fine without the amendment

Thank you
 
Upvote 0
You say that the original formula is working. It doesn't address the required result if the final IF function is false.

=IF(A6=Controls!$B$3,IF(AD6="CLEAR","CLEAR",IF(AND($AB$5>="5",$AB$5<="6",MyB!$J$2=0,$AA$5="0:0"),"BACK",IF(AND($AB$5>="10",$AB$5<="11",MyB!$J$2=1,$AA$5="0:0"),"BACK",IF(AND($AB$5>="15",$AB$5<="16",MyB!$J$2=2,$AA$5="0:0"),"BACK",IF(AND($AB$5>="20",$AB$5<="21",MyB!$J$2=3,$AA$5="0:0"),"BACK",IF(OR($AA$5<>"0:0",$AC$5="HT"),"LAY","What if false")))))),"")


I think you need resolve that before you do the mod.
 
Upvote 0

Forum statistics

Threads
1,214,575
Messages
6,120,334
Members
448,956
Latest member
Adamsxl

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