Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
tuph
 
Posts: n/a
Default Calculating months in year July - June


This is probably a basic question, but how do use a date cell to
calculate how many months have gone by if my financial year runs from
July to June and a sale was made in April (the result should be 10)?

Thanks in anticipation


--
tuph
------------------------------------------------------------------------
tuph's Profile: http://www.excelforum.com/member.php...o&userid=31390
View this thread: http://www.excelforum.com/showthread...hreadid=554396

  #2   Report Post  
Posted to microsoft.public.excel.misc
duane
 
Posts: n/a
Default Calculating months in year July - June


if months are in cells a1 and a2

=if(month(a2)<month(a1), 12 + month(a2)-month(a1), month(a2)-month(a1))


--
duane


------------------------------------------------------------------------
duane's Profile: http://www.excelforum.com/member.php...o&userid=11624
View this thread: http://www.excelforum.com/showthread...hreadid=554396

  #3   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Calculating months in year July - June

=DATEDIF(FY_Start,sale_date,"m")+1

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"tuph" wrote in message
...

This is probably a basic question, but how do use a date cell to
calculate how many months have gone by if my financial year runs from
July to June and a sale was made in April (the result should be 10)?

Thanks in anticipation


--
tuph
------------------------------------------------------------------------
tuph's Profile:

http://www.excelforum.com/member.php...o&userid=31390
View this thread: http://www.excelforum.com/showthread...hreadid=554396



  #4   Report Post  
Posted to microsoft.public.excel.misc
tuph
 
Posts: n/a
Default Calculating months in year July - June


Thanks, Bob, but I can't get your formula to work. I entered the
formula as:

=DATEDIF(1/7/2005,A10,"m")+1 (where the date in A10 = 1/10/2005)

and got the result of 1270, whereas the result I'm looking for is 4.

Should I have substituted something for "m"?

Trish


--
tuph
------------------------------------------------------------------------
tuph's Profile: http://www.excelforum.com/member.php...o&userid=31390
View this thread: http://www.excelforum.com/showthread...hreadid=554396

  #5   Report Post  
Posted to microsoft.public.excel.misc
David Biddulph
 
Posts: n/a
Default Calculating months in year July - June

"tuph" wrote in message
...

Thanks, Bob, but I can't get your formula to work. I entered the
formula as:

=DATEDIF(1/7/2005,A10,"m")+1 (where the date in A10 = 1/10/2005)

and got the result of 1270, whereas the result I'm looking for is 4.

Should I have substituted something for "m"?


Yes "ym", but you also need to get the starting date into tyhe right format;

=DATEDIF(DATE(2005,7,1),A10,"ym")+1
--
David Biddulph




  #6   Report Post  
Posted to microsoft.public.excel.misc
David Biddulph
 
Posts: n/a
Default Calculating months in year July - June

"David Biddulph" wrote in message
...
"tuph" wrote in
message ...

Thanks, Bob, but I can't get your formula to work. I entered the
formula as:

=DATEDIF(1/7/2005,A10,"m")+1 (where the date in A10 = 1/10/2005)

and got the result of 1270, whereas the result I'm looking for is 4.

Should I have substituted something for "m"?


Yes "ym", but you also need to get the starting date into tyhe right
format;

=DATEDIF(DATE(2005,7,1),A10,"ym")+1


Too hurried reply again, I'm sorry. Actually the "m", rather than "ym" is
OK if the difference is less than a year. If there are years & months & you
need to sort out the extra months beyond the full years, that's where the
"ym" would be needed.
--
David Biddulph


  #7   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Calculating months in year July - June

You have passed an invalid date, try

=DATEDIF(date(2005,7,1),A10,"m")+1

or

=DATEDIF(--"2005-07-01",A10,"m")+1

or better put it in a cell and reference that cell.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"tuph" wrote in message
...

Thanks, Bob, but I can't get your formula to work. I entered the
formula as:

=DATEDIF(1/7/2005,A10,"m")+1 (where the date in A10 = 1/10/2005)

and got the result of 1270, whereas the result I'm looking for is 4.

Should I have substituted something for "m"?

Trish


--
tuph
------------------------------------------------------------------------
tuph's Profile:

http://www.excelforum.com/member.php...o&userid=31390
View this thread: http://www.excelforum.com/showthread...hreadid=554396



  #8   Report Post  
Posted to microsoft.public.excel.misc
tuph
 
Posts: n/a
Default Calculating months in year July - June


Bewdiful!!! Thanks very much, Bob. That's exactly what I needed.

Trish


--
tuph
------------------------------------------------------------------------
tuph's Profile: http://www.excelforum.com/member.php...o&userid=31390
View this thread: http://www.excelforum.com/showthread...hreadid=554396

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
holiday dates bucci Excel Worksheet Functions 4 June 15th 06 09:35 AM
Calculating by individual months of the year Maddoktor Excel Discussion (Misc queries) 3 February 8th 06 08:55 PM
Help finding dates July thru June lawdoggy Excel Worksheet Functions 0 February 7th 06 08:26 PM
Help finding dates July thru June lawdoggy Excel Worksheet Functions 0 February 7th 06 08:26 PM
Date Calculations Bruce Excel Worksheet Functions 11 May 19th 05 01:09 AM


All times are GMT +1. The time now is 11:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"