#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 172
Default Autocomplete -Date

If I enter the following date on today (Nov 30, 2009) 2/15 the date
that is entered is 2/15/2009. Is there anyway to get Excel to default
to entering 2/15/2010, in other words not complete the date with the
current calendar year but rather select the year of the next occurence
of the MM/DD?


John Keith

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default Autocomplete -Date

You can either enter this formula in a separate cell:

=DATE(YEAR(A1)+(A1<TODAY()),MONTH(A1),DAY(A1))

or install this change event sub if you want the result in the input cell:

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Target.Address(False, False) = "A1" Then _
Target = DateSerial(Year(Target) - (Target < Date), Month(Target),
Day(Target))
Application.EnableEvents = True
End Sub

Post if you need help to install it!
Regards,
Stefi


€˛John Keith€¯ ezt Ć*rta:

If I enter the following date on today (Nov 30, 2009) 2/15 the date
that is entered is 2/15/2009. Is there anyway to get Excel to default
to entering 2/15/2010, in other words not complete the date with the
current calendar year but rather select the year of the next occurence
of the MM/DD?


John Keith

.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 172
Default Autocomplete -Date

Stefi,

Thank you for the sugestions.

What would have been ideal for my situation would be a option
configuration switch but obviously that does not exist :-(

On Tue, 1 Dec 2009 00:11:01 -0800, Stefi
wrote:

You can either enter this formula in a separate cell:

=DATE(YEAR(A1)+(A1<TODAY()),MONTH(A1),DAY(A1))

or install this change event sub if you want the result in the input cell:




John Keith

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default Autocomplete -Date

You are welcome! Thanks for the feedback!
This is really a specific job, you cannot expect a solution ready to use.
Clicking the YES button will be appreciated.


--
Regards!
Stefi



€˛John Keith€¯ ezt Ć*rta:

Stefi,

Thank you for the sugestions.

What would have been ideal for my situation would be a option
configuration switch but obviously that does not exist :-(

On Tue, 1 Dec 2009 00:11:01 -0800, Stefi
wrote:

You can either enter this formula in a separate cell:

=DATE(YEAR(A1)+(A1<TODAY()),MONTH(A1),DAY(A1))

or install this change event sub if you want the result in the input cell:




John Keith

.

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
AutoComplete Cathy Excel Discussion (Misc queries) 0 June 22nd 08 04:40 PM
AutoComplete Nicola Excel Worksheet Functions 6 October 3rd 06 09:29 PM
AutoComplete Nimish Excel Discussion (Misc queries) 1 September 21st 06 12:28 AM
AutoComplete Please! Phippsy Excel Discussion (Misc queries) 2 March 20th 06 05:11 PM
VBA Autocomplete [email protected] Excel Discussion (Misc queries) 0 January 11th 06 05:01 PM


All times are GMT +1. The time now is 07:19 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"