+ Reply to Thread
Results 1 to 6 of 6

Formula to replace cells in range with strings if found

  1. #1
    Forum Contributor JP Romano's Avatar
    Join Date
    10-09-2008
    Location
    Princeton, NJ
    MS-Off Ver
    2010
    Posts
    500

    Formula to replace cells in range with strings if found

    Hey all - could use a hand with a formula that I just can't seem to get working. Unfortunately, I cannot use VBA to solve this one.

    Spreadsheet (attached) has 2 columns - ShortName and LongName

    Need a formula that will find any instance of each short name in the LongName Column, and put that shortname in the adjacent column.

    So if Shortname list has "Edgewood" and any cell in the LongName column has "Barnaby Heights, Edgewood, Salvador", the adjacent cell in column C should just read "Edgewood"
    Hopefully the attachment will make it clearer than I can describe here.

    Thanks for any help!

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,098

    Re: Formula to replace cells in range with strings if found

    Can you try to attach the file again.... it dropped off somewhere!
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: Lá fhéile Pádraig sona dhaoibh

  3. #3
    Forum Contributor JP Romano's Avatar
    Join Date
    10-09-2008
    Location
    Princeton, NJ
    MS-Off Ver
    2010
    Posts
    500

    Re: Formula to replace cells in range with strings if found

    Still trying to find the link to add it! Sorry for the delay

  4. #4
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Formula to replace cells in range with strings if found

    Assuming we're talking about columns A and B here then this might work in C2:

    Please Login or Register  to view this content.
    Adjust $A$2:$A$6 to be the full range of ShortName values.

    WBD
    Office 365 on Windows 11, looking for rep!

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,098

    Re: Formula to replace cells in range with strings if found

    Oh right!! Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

  6. #6
    Forum Contributor JP Romano's Avatar
    Join Date
    10-09-2008
    Location
    Princeton, NJ
    MS-Off Ver
    2010
    Posts
    500

    Re: Formula to replace cells in range with strings if found

    WideBoyDixon - that's PERFECT, thank you!

    Glenn, sorry, I have no idea why my file won't attach. Not getting any errors when I try, it's just not working.

    THANK YOU!

+ 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. Search range for a list of strings, show userform and replace selected cells.
    By banaanas in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-24-2015, 01:04 AM
  2. [SOLVED] Copy cells between two found instances of a different strings
    By joevan1 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-01-2014, 09:40 PM
  3. [SOLVED] Replace function missing strings in a merged range?
    By Glitches in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-11-2014, 05:12 AM
  4. [SOLVED] Formula for counting the number of occurrences within a range of cells AND Strings help
    By V1gilante in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-14-2014, 07:58 PM
  5. Replies: 4
    Last Post: 01-10-2013, 08:25 PM
  6. [SOLVED] Find strings within cells and replace with string from a table
    By MMSte in forum Excel General
    Replies: 6
    Last Post: 05-14-2012, 12:22 PM
  7. Replace range of cells with a formula
    By dcgrove in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-22-2010, 07:48 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