Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Seeing another post, I noticed that you can format dates from cells:
i.e. strDate = Format(Cells(selection, "A"), "dd/mm/yyyy") That sounds idea for what I need. However, I guess I need to set the variable strDate to a Date. i.e. Dim strDate as Date That is great. But what I need to do is also have a condition that sets the strDate variable to nothing if a condition is true i.e. If strCondition = "1" then strDate = Format(Cells(selection, "A"), "dd/mm/yyyy") Else strDate = "" End if When I tried this, it said Type Mismatch. Obviously I need to wipe the old date out from the variable stDate everytime I loop through. Is there a way to set a date to nothing? Any help is appreciated. --- Message posted from http://www.ExcelForum.com/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Concatenate including a date so that the date appears as a date | Excel Worksheet Functions | |||
date in Cell to change colors if the date is beyond today's date | Excel Discussion (Misc queries) | |||
Making a date go red, if date passes todays date. | Excel Worksheet Functions | |||
Report Date - Date Recv = Days Late, but how to rid completed date | Excel Worksheet Functions | |||
Date updates from worksheet to chart & changes date to a date series! Help!! | Charts and Charting in Excel |