Results 1 to 11 of 11

search & replace macro

Threaded View

  1. #1
    Registered User
    Join Date
    12-12-2006
    Posts
    63

    search & replace macro

    Hi, I'm using search & replace in a macro but only want to replace the text if it is in the first 3 letters within the cell. So, for example, I currently have;


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

    This is to delete the text "DS" but obviously it's deleting DS anywhere within the text rather than just at the beginning of the text.

    any help much appreciated.

    Liam
    Last edited by LiamF; 07-30-2010 at 06:57 AM.

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