+ Reply to Thread
Results 1 to 3 of 3

Find and replace dates

Hybrid View

Paul Morgan Find and replace dates 08-11-2007, 09:06 AM
davesexcel Find and Replace Macro 08-11-2007, 09:25 AM
Paul Morgan Cool, Works just as you say 08-12-2007, 02:21 PM
  1. #1
    Registered User
    Join Date
    05-21-2006
    Location
    Cochrane
    MS-Off Ver
    365
    Posts
    59

    Find and replace dates

    Hi, I am having problems finding and replacing dates..
    I hit Ctrl H and enter the date to find then go to options to set the format and still the date couldn't be found, is there another way??
    Paul

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525

    Find and Replace Macro

    Here's a find and replace macro, the main problem is probable the formatting in the find. in find and replace form hit the options button and select the format you are looking for, anyway here is the macro,

    Sub Macro1()
    ' Macro1 Macro
    ' Macro recorded 8/11/2007 by David Morrison
        Application.FindFormat.Clear
        Application.FindFormat.NumberFormat = "m/d/yyyy"
        Cells.Replace What:=Range("A1"), Replacement:=Range("B1"), LookAt:=xlWhole, _
                      SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=True, _
                      ReplaceFormat:=True
    End Sub
    This code searches for the value in range A1 and its format, then replaces it with the value in B1

  3. #3
    Registered User
    Join Date
    05-21-2006
    Location
    Cochrane
    MS-Off Ver
    365
    Posts
    59
    Cool,
    Works just as you say

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1