Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Daisy Brown   on Dec 25 In MS Office Category.

  
Question Answered By: Abbie Hughes   on Dec 25

I added the CDate function so the variable would display as a date
(say, 01/05/2005) in the msgbox. If i remove it they just display
the date  as a number (38473). Either way, the max  and min  is
returning the same value and not distinguising between the dates.

For example, I know that the earliest date in the named  range is
01/05/2004 and the most recent is 03/02/2006. Using the code
originally posted, both Max and Min return  the 01/05/2004 date. If i
remove the CDate they both return 38108.

If i do the same thing on the worksheet rather than use VBA they
behave as expected, which is why i can't figure out why the VBA
fails to tell the difference.

Share: 

 

This Question has 5 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Extracting dates from named range Or get search suggestion and latest updates.


Tagged: