# Using the formulas AND, IF, OR together

1. ## Using the formulas AND, IF, OR together

Dear everyone,

I got stuck in one exercise and I hope you can help me.

This is the case: I have a list of people that obtained 4 different grades and the minimum grade to pass a module is 50. I now have to calculate which people did exactly pass 3 out of 4 modules by using the formulas AND,IF,OR. I really don't understand how to calculate it. I have added the excel file. Thanks in advance  Register To Reply

2. ## Re: Using the formulas AND, IF, OR together

One way:

=IF(SUMPRODUCT(--(\$B5:\$E5>=\$D\$3))=3,"yes","no")

You could use a similar formula for the other options (one or all(4))

Regards  Register To Reply

3. ## Re: Using the formulas AND, IF, OR together

All: =IF(SUMPRODUCT(--(\$B5:\$E5>=\$D\$3))=4,"yes","no")

>=1: =IF(SUMPRODUCT(--(\$B5:\$E5>=\$D\$3))>=1,"yes","no")  Register To Reply

4. ## Re: Using the formulas AND, IF, OR together

Try this. It works. I ahve also attached your workbook with the formula in column H. ``Please Login or Register  to view this content.``
If you could use other functions like COUNT, the formula could be simpler.

modytrane.  Register To Reply

5. ## Re: Using the formulas AND, IF, OR together

Thanks for your help!! I have one question left What exactly does the part of the formula (-- mean ??  Register To Reply

6. ## Re: Using the formulas AND, IF, OR together

You're welcome. Thanks for the rep.

The double negative just coerces a numeric value. If you don't have it, you get a zero result.

Regards  Register To Reply