Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete ' from date
Hi,
i have 10523 lines with dates in col D, with dates written as '27/10:09 etc. What code could i use to find all the ' and delete them? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete ' from date
Sub tickiller()
Dim r As Range, rr As Range Set r = Intersect(Range("D:D"), ActiveSheet.UsedRange) For Each rr In r If rr.PrefixCharacter = "'" Then rr.Value = rr.Value End If Next End Sub -- Gary''s Student - gsnu201001 "LiAD" wrote: Hi, i have 10523 lines with dates in col D, with dates written as '27/10:09 etc. What code could i use to find all the ' and delete them? Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete ' from date
Or, alternately, simply select Column D and run this single line of code
from the Immediate Window... Selection.Value = Selection.Value -- Rick (MVP - Excel) "Gary''s Student" wrote in message ... Sub tickiller() Dim r As Range, rr As Range Set r = Intersect(Range("D:D"), ActiveSheet.UsedRange) For Each rr In r If rr.PrefixCharacter = "'" Then rr.Value = rr.Value End If Next End Sub -- Gary''s Student - gsnu201001 "LiAD" wrote: Hi, i have 10523 lines with dates in col D, with dates written as '27/10:09 etc. What code could i use to find all the ' and delete them? Thanks |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete ' from date
Sorry (for my other reply), I see the OP wanted VB code; your macro could be
reduced to this... Sub tickiller() Columns("D").Value = Columns("D").Value End Sub -- Rick (MVP - Excel) "Gary''s Student" wrote in message ... Sub tickiller() Dim r As Range, rr As Range Set r = Intersect(Range("D:D"), ActiveSheet.UsedRange) For Each rr In r If rr.PrefixCharacter = "'" Then rr.Value = rr.Value End If Next End Sub -- Gary''s Student - gsnu201001 "LiAD" wrote: Hi, i have 10523 lines with dates in col D, with dates written as '27/10:09 etc. What code could i use to find all the ' and delete them? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Delete Date Macro | Excel Programming | |||
Delete Rows If Date Less Than Date Value | Excel Programming | |||
how do I delete a row automatically after each date | Excel Discussion (Misc queries) | |||
Delete row if no date exist | Excel Programming | |||
Macro want delete the date row? | Excel Programming |