+ Reply to Thread
Results 1 to 3 of 3

Find/Replace with the value of a cell

  1. #1
    Registered User
    Join Date
    09-29-2009
    Location
    Prestatyn, Wales
    MS-Off Ver
    Excel 2003
    Posts
    9

    Find/Replace with the value of a cell

    Hi,

    Sorry if I posted in the wrong place - wasn't sure where this should go.

    Anyway my problem is that I have a spreadsheet that has a couple of hundred rows in it, each row having a cell (column A) in it that has a content similar to;

    'This ink cartridge is for the &PRINTER printer'

    and on the same row I have another cell (column B) that holds the value of &PRINTER

    My question is, how do I replace the &PRINTER in column A with the value in column B?

    Thanks

    Gareth

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Find/Replace with the value of a cell

    You could create the revised string in C

    C1: =SUBSTITUTE(A1,"&PRINTER",B1)
    copied down

    If you want to override original values altogether (ie update A) then you would need to use VBA or use the above and copy / paste special / values only the results over the original values and subsequently delete C.

    VBA route could be something like:

    Please Login or Register  to view this content.
    above assumes strings are in A1 onwards and printer replacement strings in B1 onwards.
    Last edited by DonkeyOte; 09-29-2009 at 05:08 AM. Reason: added VBA example

  3. #3
    Registered User
    Join Date
    09-29-2009
    Location
    Prestatyn, Wales
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Find/Replace with the value of a cell

    Thanks a lot :D

+ 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