IF and OR functions

  • Thread starter F. Lawrence Kulchar
  • Start date
F

F. Lawrence Kulchar

I have this formula typed into a cell:

=IF((C10+B26)>180,C10+B26-360,C10+B26)

AND...it works fine; however, I have to add the following parameter to the
same cell:

= IF((C10+B26)<180,C10+B26+360,C10+B26)

Please notice the subtle differences..I am working with a global 360 degree
sphere wherein when values are combined, I can be maxed at positive
(+179.999) degrees or minimized at negative (-179.999) degrees.

I tried the "OR" function outside my "IF" function, but all I got was "TRUE"
for the answer..not an actual number.

PLEASE OFFER THE CORRECT FORMULA.

Thank you,

FLKulchar
 
F

FLKulchar

I have figured it out on my own...simply, I "nested" the 'IF' functions.

Thanks,

FLKulchar
 
J

Joel

Try lookup instead

=lookup((C10+B26),{-180,180,360;C10+B26+360,C10+B26,C10+B26-360})
 
F

FLKulchar

Joel:

I cannot get your array "lookup" formula to work -- I get an error message
with the C10 +B26+360 bit of info.

Please explain please!

Thanks,

FLKulchar
 
F

FLKulchar

HERE IS THE CORRECTED nested "IF" FUNCTION ANSWER:

=IF((C10+B26)>=180,C10+B26-360,IF((C10+B26)<=-180,C10+B26+360,C10+B26))

THERE WE GO..IT WORKS:

As to the LOOKUP function, I do NOT comprehend it, i.e. I cannot get it to
work!


Thanks,

FLKulchar
 
F

FLKulchar

Joel:

This solution you suggested:

Try lookup instead

=lookup((C10+B26),{-180,180,360;C10+B26+360,C10+B26,C10+B26-360})


does NOT seem to work, as my EXCEL does not recognize the C10+B26 as part of
the array...any explanations?

Thanks,

FLKulchar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top