Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default How do I remove the ' from the begining of value in a cell

I have a column containing dates but some begin with a ' which I need to
remove programatically.... any ideas. I already have the for next loop set up
but unable to find the correct method for detecting the ' and also removing
it to leave the date entry intact.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default How do I remove the ' from the begining of value in a cell

Sub tic_killer()
Set rr = ActiveSheet.UsedRange.SpecialCells(xlCellTypeConst ants, xlTextValues)
For Each r In rr
If r.PrefixCharacter = "'" Then
r.Value = r.Value
End If
Next
End Sub
--
Gary''s Student - gsnu200733
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default How do I remove the ' from the begining of value in a cell

This worked a treat, many thanks for your help.....

"Gary''s Student" wrote:

Sub tic_killer()
Set rr = ActiveSheet.UsedRange.SpecialCells(xlCellTypeConst ants, xlTextValues)
For Each r In rr
If r.PrefixCharacter = "'" Then
r.Value = r.Value
End If
Next
End Sub
--
Gary''s Student - gsnu200733

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,886
Default How do I remove the ' from the begining of value in a cell

Hi

Range("A1") = Range("A1")*1

--
Regards

Roger Govier


"Givnik" wrote in message
...
I have a column containing dates but some begin with a ' which I need
to
remove programatically.... any ideas. I already have the for next loop
set up
but unable to find the correct method for detecting the ' and also
removing
it to leave the date entry intact.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default How do I remove the ' from the begining of value in a cell

Hi Roger, Many thanks I did try this but got the following error 'Type
Mismatch', not sure but can you multiply a date? anyway I do appreciate your
response...



"Roger Govier" wrote:

Hi

Range("A1") = Range("A1")*1

--
Regards

Roger Govier


"Givnik" wrote in message
...
I have a column containing dates but some begin with a ' which I need
to
remove programatically.... any ideas. I already have the for next loop
set up
but unable to find the correct method for detecting the ' and also
removing
it to leave the date entry intact.






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
How to keep zeros at the begining of a number sockst Excel Worksheet Functions 2 November 5th 08 12:42 PM
how do i get a list of only the begining of weeks in excel? F4Forte Excel Worksheet Functions 1 April 10th 07 04:01 PM
select text in cell based on text from another cell, paste the text at the begining of a thrid cell, etc... jsd219 Excel Programming 0 October 19th 06 05:04 PM
option to keep zero at begining of number gritter Excel Discussion (Misc queries) 1 September 7th 06 07:56 PM
how to add symbol automatically at begining and end Don Excel Discussion (Misc queries) 2 October 22nd 05 01:11 AM


All times are GMT +1. The time now is 11:03 AM.

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

About Us

"It's about Microsoft Excel"