Closed Thread
Results 1 to 9 of 9

Find and replace

  1. #1
    Registered User
    Join Date
    01-06-2014
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Find and replace

    Hello,

    What's the formula to be used in this case please?
    I have a list of transaction showing vendors and need to shorten the name based on a word

    Examples:

    If the cell is : POSTMATES TIP SAN FRANCISCO CA formula should translate as POSTMATES
    If the cell is : POSTMATES BDC63 LA SAN FRANCISCO CA formula should translate as POSTMATES

    If the cell is : COSTCO BY INSTACART SAN FRANCISCO CA formula should translate as INSTACART
    If the cell is : GELSON BY INSTACART SAN FRANCISCO CA formula should translate as INSTACART
    If the cell is : STAPLES BY INSTACART SAN FRANCISCO CA formula should translate as INSTACART

    Thank you!

  2. #2
    Registered User
    Join Date
    04-05-2017
    Location
    Phnom Penh
    MS-Off Ver
    2016
    Posts
    7

    Re: Find and replace

    Does it have to contain all of the string or just:

    If contains postmates, then postmates
    If instacart, then instacart
    else blank

    this will do that

    Please Login or Register  to view this content.
    Edit:
    Or for one time changes, use ctrl +H

  3. #3
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Find and replace

    You need to create a lookup table, with unique name of Vendors
    The search that table in cell, if match, returns the name.
    Text in A1
    Lookup table in D1:D10
    =LOOKUP(2,1/ISNUMBER(SEARCH($D$1:$D$10,A1)),$D$1:$D$10)
    Quang PT

  4. #4
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: Find and replace

    Raises the question what should happen if a cell in col A contains both POSTMATES and INSTACART. Granted it may never happen, but just in case it could, your LOOKUP formula would return the LAST match in D1:D10, which may be good enough. FWIW, the 1st match would be given by

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    The INDEX(ISNUMBER(...),0) term rather than just ISNUMBER(...) avoids the need for array formula entry.

  5. #5
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Find and replace

    if you just stick with find and replace (per your post title) and don't need a formula, then...
    Find what: *postmates*
    Replace with: postmates (without the asterisks)
    repeat for instacart and you're done.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Find and replace

    Administrative Note:

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  7. #7
    Registered User
    Join Date
    01-06-2014
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Find and replace

    Thank you so much! Greatly appreciate your help!

  8. #8
    Registered User
    Join Date
    01-06-2014
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Find and replace

    Thank you, this would work much better as I have a list of vendors! I greatly appreciate your help!

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Find and replace

    Administrative Note:

    Your post does not comply with Rule #6 of our Forum RULES:

    Please do not ignore requests by Administrators, Moderators and senior forum members regarding forum rules.

    If you are unclear about the request or instruction, then send a private message to them asking for clarification.

    All Participants:

    Please do not post a reply in a thread where a Moderator or Administrator has requested an action that has not yet been complied with (e.g. title change, code tags requested, etc.).

    THREAD CLOSED

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 02-13-2021, 03:32 AM
  2. Replies: 1
    Last Post: 02-27-2018, 11:22 AM
  3. [SOLVED] Using find replace to first find two double quotes and replace with a single double quote
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-17-2015, 10:13 AM
  4. [SOLVED] Find and replace where contents a formula so can't be seen by Find and replace.
    By markDuffy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-26-2015, 02:24 PM
  5. Replies: 16
    Last Post: 12-02-2014, 03:38 PM
  6. Replies: 3
    Last Post: 11-25-2014, 06:08 AM
  7. 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

Tags for this Thread

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