I'm not sure which is the correct approach to use here, but I am trying to create a spreadsheet that will allow me to sum any unpaid invoices and then compare this value with a user inputted credit limit.

There will be a column containing the amount due for each invoice, and another column where a value ("y") will be entered if the invoice has been paid. There will then be a box which shows the total amount of all unpaid invoices (where there is no "y" in the Paid column). If the amount in this total unpaid invoices cell is below the credit limit, a further cell will display "Supply", if the value exceeds the clients credit limit the cell will display the value "Do not supply".

Does anyone know how best to go about this?

Thanks,

Mark