Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Macro to identify year within a date

I need help trying to identify the year within a date written either in
mm/dd/yyyy or m/d/yyyy format. If the date is a particular year then my code
will do one thing but if it is another date it will do something else.

Please help! Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
MH MH is offline
external usenet poster
 
Posts: 30
Default Macro to identify year within a date

If Year(MyDate) = 2005 Then
Do Stuff
Else
Do Other Stuff
End If


"smitty24" wrote in message
...
I need help trying to identify the year within a date written either in
mm/dd/yyyy or m/d/yyyy format. If the date is a particular year then my
code
will do one thing but if it is another date it will do something else.

Please help! Thanks!



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
Determine year over year date for comparison zeroscou Excel Worksheet Functions 3 March 6th 09 10:01 PM
identify first date a record appears mcarrington Excel Worksheet Functions 3 December 14th 05 09:08 PM
Year-to-date year to date formula Philm Excel Worksheet Functions 1 October 7th 05 02:50 AM
Date formula: return Quarter and Fiscal Year of a date Rob Excel Discussion (Misc queries) 7 May 11th 05 08:48 PM
Identify date in 2 rows dave Excel Worksheet Functions 2 November 11th 04 12:34 PM


All times are GMT +1. The time now is 07:45 PM.

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"