Using DATEDIF how do I add another month of each date fall on same

  • Thread starter Thread starter kmt1984
  • Start date Start date
K

kmt1984

I am using the following

=DATEDIF(C6,C5,"m")

If I enter the exact same dates the answer is obviously 0, but I want it to
be 1. I only want to add 1 if the dates are exactly the same.

In case it helps I am trying to figure out how far behind an account is, and
if the dates are the same a payment was not made and one more payment would
be due.

Any help would be great!
 
kmt1984 said:
=DATEDIF(C6,C5,"m")
If I enter the exact same dates the answer is obviously 0, but I want
it to be 1. I only want to add 1 if the dates are exactly the same.

If you mean that literally ("only ... if the dates are exactly the same"),
then:

=datedif(C6,C5,"m") + (C6=C5)

If you really mean "only if the dates are in the same month":

=max(1, datedif(C6,C5,"m"))


----- original message -----
 
kmt1984 said:
=DATEDIF(C6,C5,"m")
If I enter the exact same dates the answer is obviously 0, but I want
it to be 1. I only want to add 1 if the dates are exactly the same.

If you mean that literally ("only ... if the dates are exactly the same"),
then:

=datedif(C6,C5,"m") + (C6=C5)

If you really mean "only if the dates are in the same month":

=max(1, datedif(C6,C5,"m"))


----- original message -----
 
Thank you the first was exactly what I was looking for!!

Thanks again!
 
Thank you the first was exactly what I was looking for!!

Thanks again!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top