+ Reply to Thread
Results 1 to 3 of 3

Replace text in a range of cells

  1. #1
    Registered User
    Join Date
    02-15-2019
    Location
    Prague
    MS-Off Ver
    2016
    Posts
    2

    Replace text in a range of cells

    Hello. Is it possible in Excel to replace words in a range of cells with different words that I've put in another column? Here is a simplified example:

    example.png

    Here I'd like to replace cells from E5 to H5 based on the two columns on the left. So that "apple" is replaced with "socks", "pear" with "shoes", "melon" with "skirt" and "pineapple" with "shoes".

    I hope it's not too trivial. I couldn't work that out. In my project the data is of course more complicated but I think it boils down to just this.
    Thank you very much!
    Last edited by nightoul; 11-07-2019 at 10:47 AM.

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,062

    Re: Replace text in a range of cells

    Cells can contain a value or a formula, not both.

    The solution requires a formula so you cant change the values in the cells (unless you use VBA).

    But you could use other cells to produce the result you want.

    in E6
    =VLOOKUP(E5,$A5:$B8,2,0)
    and copy across to H6

    Now use the values in E6:H6 instead of E5:H5
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Registered User
    Join Date
    11-08-2019
    Location
    London
    MS-Off Ver
    2010
    Posts
    2

    Re: Replace text in a range of cells

    Thanks for your comment

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA - replace text within range with contents of another range
    By grantnorton in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-16-2018, 04:20 AM
  2. Replies: 2
    Last Post: 07-08-2017, 04:07 AM
  3. [SOLVED] VBA to replace cells containing specific text in a large range with an array formula
    By DaveBre in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-22-2016, 01:21 AM
  4. [SOLVED] Loop Through Range, Find Text, and Replace Text
    By EnigmaMatter in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-09-2014, 12:01 PM
  5. Replies: 8
    Last Post: 03-03-2011, 03:28 PM
  6. Code to replace text in a range of cells in a particular column
    By Zyphon in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-16-2007, 06:57 AM
  7. [SOLVED] replace a range of #'s e.g. 1.25 to 100 with text in excell
    By Painter in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-27-2005, 04:40 PM

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