Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old September 14th, 2005, 10:17 AM
Authorized User
 
Join Date: Sep 2005
Location: aberdeen, , United Kingdom.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default replace "." with "/"

hi there again,


i am trying to replace a"." with a"/" in column A, i have used the recorder and it gave me this code:

Selection.Replace What:=".", Replacement:="/", LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False


when i use the code in a macro the code moves some of my values around (it is dates in column a)
for example if i have "11.07.05" in some cases it returns "07/11/05"

any help would be great guys thanks




  #2 (permalink)  
Old September 14th, 2005, 10:47 AM
Authorized User
 
Join Date: Sep 2005
Location: aberdeen, , United Kingdom.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

if i stretch my column out the dates that are wrong have moved as shown below




Work Date
23/07/2005
          07/11/2005
14/07/2005
14/07/2005
14/06/2005
16/08/2005
18/08/2005
          06/09/2005
          07/12/2005
13/07/2005
          08/08/2005
          08/09/2005




Similar Threads
Thread Thread Starter Forum Replies Last Post
Replace In c# jayanth_nadig SQL Language 2 July 3rd, 2006 03:25 AM
replace ' and " with \' and \" Brian Campbell XSLT 4 May 24th, 2006 10:49 AM
Replace crmpicco VB How-To 15 May 20th, 2005 01:34 PM
replace() Missy_K Javascript 1 January 16th, 2004 11:17 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.