+ Reply to Thread
Results 1 to 4 of 4

Replacing Text Strings

  1. #1
    Registered User
    Join Date
    05-01-2008
    Location
    Sheffield
    Posts
    47

    Replacing Text Strings

    Good Afternoon,

    I'm looking to replace my field headers, with others. Name into First Name, Surname into Last Name...etc.

    See attached spreadsheet.

    Everytime I try Find & Replace with VB, it will Replace EVERY occurence of "name". So I end up with; First Name, SurFirstName...

    Which is very annoying! I've got half way through another fix (by finding out the address of what I want to replace, rather than the string itself), but want VB to do all the work...

    Any help is appreciated.

    Thanks!

    N.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    03-30-2009
    Location
    Derby, England
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: Replacing Text Strings

    You could do this with a lookup table

    paste the following in to a cell (say A2), then replicate right. You can then copy/paste values back in to the 1st row, if you need to.

    =VLOOKUP(A1,$A$10:$C$12,3,FALSE)

    Is this what you were trying to do, or have I misunderstood?

    Cheers

    Mat

  3. #3
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile Re: Replacing Text Strings

    Good afternoon newbie13

    You need to use the xlWhole switch (if you're using XL2003 or higher). Your workbook didn't have any code in it so I can't tailor this to your code :
    Please Login or Register  to view this content.
    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  4. #4
    Registered User
    Join Date
    05-01-2008
    Location
    Sheffield
    Posts
    47

    Re: Replacing Text Strings

    thanks,

    i'm looking for something more like this...

    http://www.excelforum.com/excel-work...d-replace.html

    this looks to be exactly what i need, but cant get it to work...

    any ideas?

+ 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