Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Calculate Days Left in Current Year

I need to perform a calculation that returns the number of days that remain
in the current year from a variable date entered into a cell. I could enter
the last day of the year - 31/12/XX - into another cell but this would
require the user to update that value when the year changed. Can I base the
value of the (end of year) cell on a formula so the year changes
automatically when 31 Dec becomes 1 Jan - ie: change from 31/12/08 to
31/12/09 - or is there a formula where I can obtain the number of days
remaining in the current year based on the value entered into the variable
cell?

Thanks for any suggestions /solutions

Dave


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Calculate Days Left in Current Year

Hi,

For a running total use

=DATE(YEAR(TODAY()),12,31)-TODAY()

or for a date in a cell use

=DATE(YEAR(TODAY()),12,31)-A1

Where a1 is a date

Mike

"Dave C" wrote:

I need to perform a calculation that returns the number of days that remain
in the current year from a variable date entered into a cell. I could enter
the last day of the year - 31/12/XX - into another cell but this would
require the user to update that value when the year changed. Can I base the
value of the (end of year) cell on a formula so the year changes
automatically when 31 Dec becomes 1 Jan - ie: change from 31/12/08 to
31/12/09 - or is there a formula where I can obtain the number of days
remaining in the current year based on the value entered into the variable
cell?

Thanks for any suggestions /solutions

Dave


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default Calculate Days Left in Current Year

Dave C wrote:
I need to perform a calculation that returns the number of days that remain
in the current year from a variable date entered into a cell. I could enter
the last day of the year - 31/12/XX - into another cell but this would
require the user to update that value when the year changed. Can I base the
value of the (end of year) cell on a formula so the year changes
automatically when 31 Dec becomes 1 Jan - ie: change from 31/12/08 to
31/12/09 - or is there a formula where I can obtain the number of days
remaining in the current year based on the value entered into the variable
cell?

Thanks for any suggestions /solutions

Dave



With your "variable date" entered in A1:

=DATE(YEAR(A1)+1,1,1)-A1

So, for December 31st, the result would be 1. If you want the result to be 0,
change the formula to the following:

=DATE(YEAR(A1)+1,1,0)-A1
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Calculate Days Left in Current Year

Thanks Mike ... it worked a treat

"Mike H" wrote:

Hi,

For a running total use

=DATE(YEAR(TODAY()),12,31)-TODAY()

or for a date in a cell use

=DATE(YEAR(TODAY()),12,31)-A1

Where a1 is a date

Mike

"Dave C" wrote:

I need to perform a calculation that returns the number of days that remain
in the current year from a variable date entered into a cell. I could enter
the last day of the year - 31/12/XX - into another cell but this would
require the user to update that value when the year changed. Can I base the
value of the (end of year) cell on a formula so the year changes
automatically when 31 Dec becomes 1 Jan - ie: change from 31/12/08 to
31/12/09 - or is there a formula where I can obtain the number of days
remaining in the current year based on the value entered into the variable
cell?

Thanks for any suggestions /solutions

Dave


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
calculate days per year 3307 Excel Discussion (Misc queries) 4 April 30th 08 04:31 PM
Formula to calculate the current year mda19652 Excel Discussion (Misc queries) 1 June 4th 07 05:53 AM
calculate prior calendar year end from a moving current date Louise Excel Worksheet Functions 1 December 6th 06 08:48 PM
days since 1/1/current year dan Excel Discussion (Misc queries) 6 October 14th 06 07:20 PM
how do we calculate T-bill Price in 365 days year. ASHAR ZUKA FAROOQI Excel Worksheet Functions 3 May 18th 05 03:08 PM


All times are GMT +1. The time now is 03:09 AM.

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

About Us

"It's about Microsoft Excel"