I have been running to problem with datapart function while debugging existing macros. The problems is datepart returns 12 for m when it reads an empty cell. So the scripts get into a never ending loop of reading empty cells and returning 12; eventually program hangs.
Here is the simple script:
The data in column 2 of sheet1 is as follows:
11/01/2011
11/02/2011
11/03/2011
11/03/2011
12/1/2011
12/1/2011
12/2/2011
11/03/2011
Any suggestions why datepart does not do what it is supposed to do? Please advise.
Is this an application bug never reported?
Thanks,
Bookmarks