# IF with 2 conditions and 3 possible answers

#### RCWino

##### New Member
I have a spreadsheet with a list of loans. I want to calculate the number of months that a loan interest payment is late if it's not yet reached maturity, or the number of months interest was unpaid if the maturity date has already passed. And, if there's nothing late, then leave the cell empty.

My spreadsheet has 3 dates: today's date, the date of the first missed interest payment and the maturity date of the loan. Also, have column that is X'd if a loan is late.

So, for example, if a payment is late and today's date is earlier than maturity date, then show number of months between today's date and the month of the first missed payment.
And, if a payment is late and today's date is past the maturity date, then show the number months between the maturity date and the month of the first missed payment.
Leave blank all loans that are current.

I've been playing with IF, AND for a couple of days. I'm stuck.
Thank you in advance for any help. Much appreciated.

#### PCL

##### Well-known Member
Can show an example with dates and results you expect, something like
A1 = 13/3/2018
b1 = Today()
etc ...

#### RCWino

##### New Member
Can show an example with dates and results you expect, something like
A1 = 13/3/2018
b1 = Today()
etc ...
OK, here are my actual cells:
F1 = Today()
C3 = I will put an X there if a loan payment is late.
D3 = 1st unpaid month. I insert a date. (C3 will have been checked).
F3 = the number of months either between today and 1st unpaid month (if maturity date is in the future), or between the maturity date and the 1st unpaid month (if the maturity date has already passed). This is the cell I need a formula for. I would like it to remain empty if a loan is not late.
M3 = maturity date

Thank you!

#### PCL

##### Well-known Member
If financial stuff are clear for you it is not others.
Can you give more details in your example:

OK, here are my actual cells:
F1 = Today() => Clear but to avoid changes in you example give a value
C3 = I will put an X there if a loan payment is late. => How to see a loan paiement late in your example
D3 = 1st unpaid month. I insert a date. => Example please (C3 will have been checked).
F3 = the number of months either between today and 1st unpaid month => Give a value according to your example
(if maturity date is in the future), or between the maturity date and the 1st unpaid month (if the maturity date has already passed). => Give example with value

This is the cell I need a formula for. I would like it to remain empty if a loan is not late.

M3 = maturity date => example please

Last edited: