LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default DateSerial vs Date??

Excel 2007 Win 7 64-bit
The range rColJ is a string of cells containing dates, the largest of which
is 6 Dec 09. That string of dates was not changed in the following
troubleshooting procedure.
I want to know if the maximum date in rColJ = 1 Dec 09. My code is:
If Application.Max(rColJ)DateSerial (2009, 12, 1) Then....
The argument is False, even though 6 Dec 09 is in that range.
I changed that line of code and substituted the numerical value of 6 Dec 09
(38686) for the DateSerial expression:
If Application.Max(rColJ)38686 Then....
That argument is True.
What mistake did I make in using the DateSerial VBA function?
Thanks for your time. Otto

 
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
DateSerial function inungh Excel Programming 3 December 11th 08 07:59 PM
Recreating the DateSerial()/Date() function Conan Kelly Excel Worksheet Functions 1 March 1st 08 04:43 AM
Recreating the DateSerial()/Date() function Conan Kelly Excel Programming 1 March 1st 08 04:43 AM
using dateserial in vb mwam423 Excel Programming 3 June 14th 07 02:45 AM
DateSerial Troubles rockerx Excel Programming 1 March 14th 07 08:14 PM


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