IF AND help

Closed
Todd - Jul 3, 2010 at 08:05 PM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Jul 3, 2010 at 09:32 PM
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 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Jul 3, 2010 at 09:32 PM
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,"")))
0