Problem with Nested IF/OR

Status
Not open for further replies.

andrewb90

Well-known Member
Joined
Dec 16, 2009
Messages
1,077
Hello,

I am using this formula:
Code:
=IF(H35=0,"-",(IF(OR($M$23>M35,$M$26>M35,$M$29>M35,$M$32>M35,$M$35>M35,$M$38>M35,$M$41>M35,$M$44>M35,$M$47>M35,$M$50>M35,$M$53>M35,$M$56>M35,$M$59>M35,$M$62>M35,$M$65>M35,$M$68>M35,$M$71>M35,$M$74>M35,$M$77>M35,$M$80>M35,$M$83>M35,$M$86>M35,$M$89>M35,$M$92>M35,$M$95>M35,$M$98>M35,$M$101>M35,$M$104>M35,$M$107>M35,$M$110>M35),"YES","NO")))


M35 has "-" as the default value. Now once H35 has a time typed into it, this cell (D35) evaluates to "NO". Once I type in a time value into M35 the value changes to "YES". However it is supposed to not change until another cell in the M column (every third cell as you can see) has a time entered that is greater than the time in M35.


Did I mess something up in this formula?
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
=if(h35=0,"-",if(or($m$23>m35,$m$26>m35,$m$29>m35,$m$32>m35,$m$35>m35,$m$38>m35,$m$41>m35,$m$44>m35,$m$47>m35,$m$50>m35,$m$53>m35,$m$56>m35,$m$59>m35,$m$62>m35,$m$65>m35,$m$68>m35,$m$71>m35,$m$74>m35,$m$77>m35,$m$80>m35,$m$83>m35,$m$86>m35,$m$89>m35,$m$92>m35,$m$95>m35,$m$98>m35,$m$101>m35,$m$104>m35,$m$107>m35,$m$110>m35),"yes","no"))
 
Upvote 0
Andrew

Try :-
Code:
=IF(H35=0,"-",IF(SUMPRODUCT(--($M$23:$M$110>M35),--(MOD(ROW($M$23:$M$110)-23,3)=0)),"YES","NO"))

hth
 
Upvote 0
I seem to be getting the same result. As soon as I type a time into M35 the value changes to YES, but it should wait until another value exceeds it before changing to YES.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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