A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

complex date function



 
 
Thread Tools Display Modes
  #1  
Old August 30th, 2005, 04:12 PM
tjb
external usenet poster
 
Posts: n/a
Default complex date function

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?
  #2  
Old August 30th, 2005, 05:00 PM
Bob Phillips
external usenet poster
 
Posts: n/a
Default

=DATEDIF(A1,DATE(YEAR(TODAY())+(MONTH(TODAY())8), 9,1),"M")

--

HTH

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


"tjb" wrote in message
news
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?



  #3  
Old August 30th, 2005, 05:02 PM
N Harkawat
external usenet poster
 
Posts: n/a
Default

=DATEDIF(A1,DATE(2005,9,1),"m")

"tjb" wrote:

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?

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
NETWORKDAYS - Multiple Date Selection Annabelle General Discussion 3 October 4th, 2005 07:04 PM
Copy Cat Ain't Working shep Setting Up & Running Reports 15 September 12th, 2005 05:14 PM
Attaching Code DS General Discussion 2 August 22nd, 2005 11:21 PM
date time =now() function Brenda Worksheet Functions 7 May 10th, 2004 12:18 AM
Excel date function Sheela Worksheet Functions 2 October 28th, 2003 10:12 AM


All times are GMT +1. The time now is 03:35 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.