[mso] Re: Excel Dates

  • From: LarrysPCRemedies@xxxxxxx
  • To: mso@xxxxxxxxxxxxx
  • Date: Wed, 16 Apr 2008 20:19:50 EDT

Robert,
 
Thanks ... works like a charm. I wouldn't have thought to test for TYPE  ...
 
Larry
 
 
 
In a message dated 4/16/2008 2:02:37 A.M. Eastern Daylight Time,  
mso@xxxxxxxxxxxxx writes:
From:  "Tillotson, Robert N (US SSA)"  <robert.tillotson@xxxxxxxxxxxxxx>

Larry,

If you are only  interested in the month and want it to be a number =
instead of an  abbreviation then try  this:

=3DIF(A5<>"",IF(TYPE(A5)=3D1,MONTH(A5),MONTH(DATEVALUE("1-"  & =
MID(A5,FIND("-",A5)+1,3) & "-1900"))),"Unknown")

It will  require no modification to your data as Excel will treat the =
invalid  dates as text anyway.  It simply pulls the month out of the =
invalid  date ( type <> 1) and builds a valid date to confert to a month  =
number.=20







**************Need a new ride? Check out the largest site for U.S. used car 
listings at AOL Autos.      
(http://autos.aol.com/used?NCID=aolcmp00300000002851)


*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, visit the group's homepage and use the dropdown 
menu at the top.  This will allow you to unsubscribe your email address or 
change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to share files with the group, you must join our Yahoo sister group. 
 This group will not allow for posting of emails, but will allow you to join 
and share problem files, templates, etc.:  
http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is for FILE 
SHARING ONLY.

If you are using Outlook and you see a lot of unnecessary code in your email 
messages, read these instructions that explain why and how to fix it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************

Other related posts: