IF AND help

[Closed]
Report
-
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
-
Hello,

I am trying to do three IF AND arguments in one cell. This is what I have and it is returning "too many arguments" error.

=IF(AND(B8<=10.02,D8<=16.7),3286.56,IF(AND(B8>10.02,D8>16.7),B8*328),IF(AND(B8>10.02,D8<16.7),3286.56))

What I need to do is compare three numers against each other. I need to compare 10.02 AND 16.7, 6.68 AND 16.7.

If B8 is less than or = to 10.02 AND d8<= to 16.7 then if true put "3286.56" in cell o9. If its false I need it to continue to compare b8 if >10.02 AND d8> 16.7. If true than multiply b8 * 328. If false, continue to look to see if B8 is > than 10.02 AND d8 < 16.7. If it is trure then "3286.56" goes in the cell.

1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
You have a wrongly placed ) and a missing ) at the end. Also you did not consider what to do if all three conditions are not true. I have put a "" if all three are false

One other issue is that when you check B8<10.02, even blank cell would be evaluated as true, so you may want to consider putting in you "AND" condition, B8<>"", D8<>""


=IF(AND(B8<>"", D8<>"",B8<=10.02,D8<=16.7),3286.56,IF(AND(B8>10.02,D8>16.7),B8*328,IF(AND(D8<>"",B8>10.02,D8<16.7),3286.56,"")))