Combining a OR and a AND in an IF statement

S

Shu of AZ

I need to add AND (t2<8) to this formula but can not make it work. Any ideas?

IF t2 is less than 8 and either G88=5.5 or g88=6 and so on. I have the OR
working but cannot get the AND to fit


=IF(OR(G88=5.5,G88=6,G88=6.5,G88=7,G88=7.5,G88=9,G88=9.5,G88=10,G88=11,G88=12),((VLOOKUP(G88,CU191:CZ207,2,FALSE)-(I88*11))/(M88)))
 
J

JMB

Try
=IF(AND(T2<8,OR(G88={5.5,6,6.5,7,7.5,9,9.5,10,11,12})),((VLOOKUP(G88,CU191:CZ207,2,FALSE)-(I88*11))/(M88)))
 
J

joeu2004

Shu said:
I need to add AND (t2<8) to this formula but can not make it work. Any ideas?

IF t2 is less than 8 and either G88=5.5 or g88=6 and so on. I have the OR
working but cannot get the AND to fit

=IF(OR(G88=5.5,G88=6,G88=6.5,G88=7,G88=7.5,G88=9,G88=9.5,G88=10,G88=11,G88=12),((VLOOKUP(G88,CU191:CZ207,2,FALSE)-(I88*11))/(M88)))

=if( and(T2<8, or(...)), vlookup(...) )
 
K

kassie

=IF(AND(T2>8,OR(G88=5.5,G88=6,G88=6.5,G88=7,G88=7.5,G88=9,G88=9.5,G88=10,G88=11,G88=12)),((VLOOKUP(G88,CU191:CZ207,2,FALSE)-(I88*11))/(M88)))
 

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