complex date function

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

OK here's what I need:

A user enters a date in A1, A2 should count number of full months between
the date entered and the next September 1st. So if they enter 6/28/05 in A1,
A2 should read with the number 2 (counting the months of July and August).
If they enter 11/21/04 in A1, it should calculate to 9 and so on.

If they enter a date in A1 that is the first of a month, then it should
count that month as well. So if they enter 5/1/05 in A1, A2 should read 4.

Of course this is possible but I can't seem to figure it out. Any
suggestions?
 
=DATEDIF(A1,DATE(YEAR(TODAY())+(MONTH(TODAY())>8),9,1),"M")

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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