Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks!!
"vqthomf" wrote: If you want to do it by code you could also use The instr and the mid function if instr(activecell,"/")=0 then activecell.value=cdate(mid(activecell,1,2( & "/" & mid(activecell,3,2) & "/" & mid(activecell,5,2)) end if hope this helps Charles "laavista" wrote: My customer is providing a spreadsheet with dates. Most of the dates are in the correct format that I need -- mm/dd/yy. However, some of the dates are coming in without slashes, e.g., 111109. I'm using VBA to format the spreadsheet, then will compare each row's date with another date in another workbook. I need all the dates to be in the mm/dd/yy format. Formatting the cell does not work. Should I loop through each date, use an "isdate" function to see if it's a valid date, then if not, parse it and add the slashes? Is there a better method? Your help would be greatly appreciated! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Date Formatting/adding slashes | New Users to Excel | |||
How do I enter a date without using slashes or dashes? | Excel Worksheet Functions | |||
how to put date slashes in to a column of number | Excel Discussion (Misc queries) | |||
how do i enter a date quickly without using slashes or dashes? | Excel Discussion (Misc queries) | |||
In Excel 2003, entering date without slashes, the date is incorre. | Excel Discussion (Misc queries) |