crmpicco
12-19-2005, 03:42 AM
'... if the cells are not empty then change the number format
'... to the date format DD MMM YY
If Range(sRange).Text <> "" Then
Range(sRange).NumberFormat = "dd mmm yy"
End If
If Range(sTempRange).Text <> "" Then
Range(sTempRange).NumberFormat = "dd mmm yy"
End If
Is there a way to check if the text/value inside sTempRange is not earlier than the text/value inside sRange??
For e.g. I have a problem in my sheet as sRange = 29-Dec-05 and sTempRange = 31-Mar-05.
Can i do a check or something for this?
Thanks.
Picco
http://vbaexpress.com/forum/images/smilies/banghead.gif
'... to the date format DD MMM YY
If Range(sRange).Text <> "" Then
Range(sRange).NumberFormat = "dd mmm yy"
End If
If Range(sTempRange).Text <> "" Then
Range(sTempRange).NumberFormat = "dd mmm yy"
End If
Is there a way to check if the text/value inside sTempRange is not earlier than the text/value inside sRange??
For e.g. I have a problem in my sheet as sRange = 29-Dec-05 and sTempRange = 31-Mar-05.
Can i do a check or something for this?
Thanks.
Picco
http://vbaexpress.com/forum/images/smilies/banghead.gif