+ Reply to Thread
Results 1 to 4 of 4

Find text in cell and replace the whole cell with text

  1. #1
    Forum Contributor
    Join Date
    08-12-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    163

    Find text in cell and replace the whole cell with text

    okay so after running my code i get cells that say 'LUMPLUMP' or 'LUMPLUMPLUMP' and this repeats

    i am adding cells together and the columns are mostly numbers but some say lump. so i get some cells that will say LUMPLUMP or more. I have used the following code to fix this problem

    Please Login or Register  to view this content.
    but i would like a better way to handle this because it could be possible that a cell contains more lumps added together then what i check for

    what i would like is to find any cell that contains the word letters LUMP and then replace the whole cell with LUMP.

    anyone know how I could do this? idn if i add wildcards if i could somehow do this.

    it will be much more easier to do this then prevent the lumps from being added in the first place because im using a scripting.dictionary to do that.

    thanks
    JD

  2. #2
    Valued Forum Contributor tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: Find text in cell and replace the whole cell with text

    Hi,
    try this
    Please Login or Register  to view this content.
    Please use [CODE]-TAGS
    When your problem is solved mark the thread SOLVED
    If an answer has helped you please click to give reputation
    Read the FORUM RULES

  3. #3
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Find text in cell and replace the whole cell with text

    Maybe just

    Please Login or Register  to view this content.
    Martin

  4. #4
    Forum Contributor
    Join Date
    08-12-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    163

    Re: Find text in cell and replace the whole cell with text

    thanks mrice and tehenXus, both solutions worked.

    I was just about to try the wildcard i thought of it while i was posting.

    thanks

+ 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. Look up text in a cell and replace with pre-defined text from a database.
    By AntonNortje in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-10-2012, 03:55 AM
  2. [SOLVED] Macro to copy cell contents then used Find & Replace to put text elswhere.
    By AimeeNZ in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-12-2012, 01:06 AM
  3. find in excel replace in word: find/replace text in text boxes and headers
    By dean.rogers in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-10-2012, 12:40 PM
  4. Advanced find and replace specific text within a cell
    By visionwindowfilms in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-14-2011, 04:28 AM
  5. Find part of text within cell and replace from another cell
    By sydinstaller in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-27-2008, 05:32 AM

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