Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Does any one know how to make this affect a selected range? What I'm trying to do is take '20031216' and turn it into '12162003'. It only has to work with 8 digit numbers (dates). I'll admit I don't know what I'm doing, but the following code clears the selected cells. Or, is there a better way to take text dates(20031216) and turn them into something Excel can use as a date
On Error Resume Nex Dim cel As Rang Dim myVar As Rang Set myVar = Selectio For Each cel In myVa If Left((Trim(cel)), 4) = "2003" The cel.Value = Text(Right(cel, 4), "####") & (Text(Left(cel, 4), "####") End I Nex With myVa .NumberFormat = "########);[Red](########) .Columns.AutoFi End Wit End Su Any help would be appreciated. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Text "comparison" operator for "contains" used in an "IF" Function | Excel Worksheet Functions | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
how i convert "100" to "hundred"( number to text) in excel-2007 | Excel Worksheet Functions | |||
HELP on "left","right","find","len","substitute" functions | Excel Discussion (Misc queries) | |||
Insert "-" in text "1234567890" to have a output like this"123-456-7890" | Excel Discussion (Misc queries) |