IF Function Exercise - Spot unpaid or underpaid invoices
Flag unpaid invoices and calculate the balance due using logical tests, a nested IF and the IFS function — 10 guided steps, write each formula then fill it down.
Write the formula in cell D2
1 / 10
In D2, write a logical test that checks whether the invoice is unpaid (the amount paid is empty).
=C2=""
2 / 10
Fill down the test (column D)
=C10=""
Write the formula in cell E2
3 / 10
In E2, write a logical test that checks whether the amount paid matches the amount of the invoice.
=B2=C2
4 / 10
Fill down the test (column E)
=B10=C10
Write the formula in cell F2
5 / 10
In F2, write an IF function that displays "KO" when the invoice has not been paid, and stays empty otherwise.
=IF(C2="","KO","")
6 / 10
Fill down the IF (column F)
=IF(C10="","KO","")
Write the formula in cell G2
7 / 10
In G2, write nested IFs: if the invoice has not been paid, display "KO"; otherwise, if the invoice amount differs from the amount paid, display the difference; otherwise display nothing.
=IF(C2="","KO",IF(B2<>C2,B2-C2,""))
8 / 10
Fill down the nested IFs (column G)
=IF(C10="","KO",IF(B10<>C10,B10-C10,""))
Write the formula in cell H2
9 / 10
In H2, write the same test with the IFS function (first whether the invoice is unpaid, then whether the invoice amount matches the amount paid).
=IFS(C2="","KO",B2<>C2,B2-C2,TRUE,"")
10 / 10
Fill down IFS (column H)
=IFS(C10="","KO",B10<>C10,B10-C10,TRUE,"")
Your score is
Restart