+ Reply to Thread
Results 1 to 8 of 8

Matching cell content against selected cells - not range

  1. #1
    Registered User
    Join Date
    10-19-2012
    Location
    Egypt
    MS-Off Ver
    Excel 2003
    Posts
    40

    Matching cell content against selected cells - not range

    Hi,

    I'm trying to use the below formula to to return "true" when text in cell (M2) matches text in selected cells on same row (A2, E2, and G2)
    However, all formulas I found online that serve this purpose deal with cell range only, not predetermined cells with exclusions.

    Formula:

    =IF(ISNUMBER(MATCH(M2,A2:G2,0),TRUE,FALSE) (This will match all cells between A2 and G2 against M2)

    Any help with reforming this formula to match selected cells only in-between that range (A2, E2 and G2)?

    Many thanks in advance,,

  2. #2
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Matching cell content against selected cells - not range

    Hello,

    Assuming you only want to check if M2 matches the text in A2, E2 and G2 at the same time, you can use this
    Please Login or Register  to view this content.
    (copy pasta from Ford)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools

    Regards,
    Lem

  3. #3
    Registered User
    Join Date
    10-19-2012
    Location
    Egypt
    MS-Off Ver
    Excel 2003
    Posts
    40

    Re: Matching cell content against selected cells - not range

    Thank you for your response.
    I don't want to return "True" when all text in the three cells match text in (M2) at same time. I only need to check if any one of the three cells (or any given cells that are not necessarily in a connected range) matches text on M2, to return "True" using the exact if statement above.

    I appreciate your help

    Quote Originally Posted by Lemice View Post
    Hello,

    Assuming you only want to check if M2 matches the text in A2, E2 and G2 at the same time, you can use this
    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Matching cell content against selected cells - not range

    In case you want it to return TRUE when the text in M2 matches at least one of the text in 3 cells, you can use this then
    Please Login or Register  to view this content.
    If you want to check it against more cell, simply add more logic statement to it.

  5. #5
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Matching cell content against selected cells - not range

    May be this..

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


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  6. #6
    Registered User
    Join Date
    10-19-2012
    Location
    Egypt
    MS-Off Ver
    Excel 2003
    Posts
    40

    Re: Matching cell content against selected cells - not range

    Thanks for your effort.
    As I mentioned, I need this to be integrated into the formula =IF(ISNUMBER(MATCH("put selected cells here",0),TRUE,FALSE) so I could customize returned value when True, False

    is there anyway to do this?


    Quote Originally Posted by Lemice View Post
    In case you want it to return TRUE when the text in M2 matches at least one of the text in 3 cells, you can use this then
    Please Login or Register  to view this content.
    If you want to check it against more cell, simply add more logic statement to it.

  7. #7
    Registered User
    Join Date
    10-19-2012
    Location
    Egypt
    MS-Off Ver
    Excel 2003
    Posts
    40

    Re: Matching cell content against selected cells - not range

    Sixthsense,,,
    Sorry I didn't notice your solution earlier!!
    That's exactly what I'm looking for, it works perfectly!!

    Thank you so much

    Quote Originally Posted by :) Sixthsense :) View Post
    May be this..

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

  8. #8
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Matching cell content against selected cells - not range

    Glad it helps you and thanks for the feedback

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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