+ Reply to Thread
Results 1 to 4 of 4

Search Cells for range of text / Return different text to another cell

  1. #1
    Registered User
    Join Date
    05-12-2016
    Location
    Houston, USA
    MS-Off Ver
    Office 365
    Posts
    11

    Search Cells for range of text / Return different text to another cell

    Cells A1:A4 can contain any of the following values:
    0A, 0B, 0C, 0D, 0E
    1A, 1B, 1C, 1D, 1E
    2A, 2B, 2C, 2D, 2E
    3A, 3B, 3C, 3D, 3E
    4A, 4B, 4C, 4D, 4E
    5A, 5B, 5C, 5D, 5E

    If any cell in the range A1:A4 contains any of the following values; "3E, 4D, 4E, 5A, 5B, 5C, 5D, 5E," then I want cell A5 to return the text "MAH"

  2. #2
    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: Search Cells for range of text / Return different text to another cell

    Perhaps this... =IF(SUMPRODUCT(COUNTIF(A1:A4,{"3E","4D","4E","5A","5B","5C","5D","5E"}))>=1,"MAH","")
    adjust the range as needed.
    Last edited by Sam Capricci; 06-12-2019 at 03:42 PM. Reason: had greater than/equal to backwards.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Registered User
    Join Date
    05-12-2016
    Location
    Houston, USA
    MS-Off Ver
    Office 365
    Posts
    11

    Re: Search Cells for range of text / Return different text to another cell

    Thank you. Just nee to make it >=1 and it works fine.

  4. #4
    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: Search Cells for range of text / Return different text to another cell

    Yes, I had it backward but edited it though you apparently made the change too.
    glad that did it for you, don't forget to mark the post as solved.

+ 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. [SOLVED] Search Range of Cells for Text string and return latest Date
    By ajlogan in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-15-2018, 08:30 AM
  2. Search a cell for text, and return all surrounding text between two cells
    By TRAPSON in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-13-2017, 02:19 PM
  3. search a range of cells for text and return that text
    By strucad in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-05-2013, 03:45 AM
  4. Search Text of Cell in a range and return the contents
    By knowing in forum Excel General
    Replies: 8
    Last Post: 11-19-2012, 08:57 AM
  5. Replies: 5
    Last Post: 03-08-2012, 01:50 AM
  6. Search Text of Cell in a range and return the contents
    By shanipk82 in forum Excel General
    Replies: 3
    Last Post: 11-26-2010, 01:34 PM
  7. Search text string for range of text values - return match
    By crugg in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-03-2010, 09:55 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