Thread: IFs and ORs
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sheeloo[_3_] Sheeloo[_3_] is offline
external usenet poster
 
Posts: 1,805
Default IFs and ORs

=IF(AND(D1=2,D3<14),0,IF(AND(D1=2,D3=14),D3-14*F1,IF(AND(D1=3,D3<16),0,IF(AND(D1=3,D3=16),D3-16*F1,IF(AND(D1=4,D3<17),0,IF(AND(D1=4,D3=17),D3-17*F1,"ERROR"))))))

Seems to be Ok.
Note that I have added equality condition also...

"DavidT" wrote:

Tried every combination I could think of, here's what I need for for a
solution for ONE cell:

If D1=2 and D3 is <14 then D5=0 , If D1=2 and D3 is 14 then D3-14*F1 OR
If D1=3 and D3 is <16 then D5=0 , If D1=3 and D3 is 16 then D3-16*F1 OR
If D1=4 and D3 is <17 then D5=0 , If D1=4 and D3 is 17 then D3-17*F1

How can I get this into a single formula for an answer in one cell?