Forum Discussion

Pirate69's avatar
Pirate69
Copper Contributor
Jan 26, 2025

Please help with linking IF(OR statements

I am attempting to write an IF(OR statement that will evaluate a single cell, containing a number between 0 and 360, and return a value between 0 and 90.

The following individual statements seem to work for the selected number ranges.

Range 0 to 90.  IF(OR(C44<90),C44*1) 

Range 90 to 180.  IF(OR(C44<180,C44>90),C44-90

Range 180 to 270.  IF(OR(C44<270,C44>180),C44-180

Range 270 to 360.  IF(OR(C44<360,C44>270),C44-270

I have attempted to combine the individual equations into a single equation.  I cannot get it to work and cannot see the error. 

IF(OR(C44<=90),C44*1,IF(C44<=180,C44>=90),C44-90,IF(C44<=270,C46>=180),C44-180,IF(C44<=360,C44>=270),C47-270)

 

For the cell C44, the following results should be obtained.

Enter 80;  yield 80.

Enter 120;  yield 30.

Enter 250;  yield 70.

Enter 300;  yield 30.

Can someone please review the equation and correct the error?  If I am using the wrong equation, please suggest the correct equation.

Thank you in advance,

Pirate69

Resources