Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 386
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete Date Macro Workbook Excel Programming 1 February 20th 09 07:53 AM
Delete Rows If Date Less Than Date Value Joe K. Excel Programming 1 October 4th 07 10:50 PM
how do I delete a row automatically after each date delete automatically Excel Discussion (Misc queries) 11 December 20th 06 08:40 PM
Delete row if no date exist THE_RAMONES Excel Programming 7 March 29th 06 03:25 PM
Macro want delete the date row? Shetty Excel Programming 5 March 3rd 04 02:08 PM


All times are GMT +1. The time now is 07:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"