PC Review


Reply
Thread Tools Rate Thread

Delete ' from date

 
 
LiAD
Guest
Posts: n/a
 
      10th Mar 2010
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 With Quote
 
 
 
 
Gary''s Student
Guest
Posts: n/a
 
      10th Mar 2010
Sub tickiller()
Dim r As Range, rr As Range
Set r = Intersect(Range("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 With Quote
 
Rick Rothstein
Guest
Posts: n/a
 
      10th Mar 2010
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" <(E-Mail Removed)> wrote in message
news:1A66A90D-2F5B-4A62-9A8D-(E-Mail Removed)...
> Sub tickiller()
> Dim r As Range, rr As Range
> Set r = Intersect(Range("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 With Quote
 
Rick Rothstein
Guest
Posts: n/a
 
      10th Mar 2010
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" <(E-Mail Removed)> wrote in message
news:1A66A90D-2F5B-4A62-9A8D-(E-Mail Removed)...
> Sub tickiller()
> Dim r As Range, rr As Range
> Set r = Intersect(Range("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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
delete by date Jean Pierre Daviau Microsoft Windows 2000 CMD Promt 6 6th Oct 2009 10:30 PM
how do I delete the date pop up Tony H Microsoft Word Document Management 0 11th Jun 2009 07:04 AM
Delete Rows If Date Less Than Date Value =?Utf-8?B?Sm9lIEsu?= Microsoft Excel Programming 1 4th Oct 2007 10:50 PM
delete date from date field =?Utf-8?B?TWFyeSBCZXRo?= Microsoft Access Getting Started 3 26th Sep 2007 04:22 PM
Delete e-mails between one date and another date? kojak Microsoft Outlook Discussion 4 25th Mar 2004 08:02 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:22 PM.