+ Reply to Thread
Results 1 to 10 of 10

If two cells contain specific text, return text from third cell.

  1. #1
    Registered User
    Join Date
    03-26-2012
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    17

    If two cells contain specific text, return text from third cell.

    If two cells contain specific text, return text from third cell. If one of the first two cells is not found, return zero.

    Please refer to attached sample document.

    Thank you.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,913

    Re: If two cells contain specific text, return text from third cell.

    Try this in B2:

    =IFERROR(LOOKUP(2,1/($A2=Data!$A$2:$A$10)/(B$1=Data!$B$2:$B$10),Data!$C$2:$C$10),0)

  3. #3
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: If two cells contain specific text, return text from third cell.

    In your data sheet insert a column in Column C and enter the following

    Please Login or Register  to view this content.
    then drag it down, you can then hide this column to keep everything looking the same.

    then in B2 of your Overview enter:
    Please Login or Register  to view this content.
    If someone has helped you then please add to their Reputation

  4. #4
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: If two cells contain specific text, return text from third cell.

    However Phuocams version is far better

  5. #5
    Registered User
    Join Date
    03-26-2012
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: If two cells contain specific text, return text from third cell.

    Phuocam, that worked. Now what if I want to lookup if one of the fields contains a portion of text? For example, if I have light blue as one of the colors but want to count that as blue?

    I appreciate the assistance! Thank you.

  6. #6
    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,055

    Re: If two cells contain specific text, return text from third cell.

    You could use this array formula in B2, copied across and down:

    =IFERROR(INDEX(Data!$C$2:$C$10,MATCH(1,(Overview!$A2=Data!$A$2:$A$10)*(ISNUMBER(SEARCH(B$1,Data!$B$2:$B$10))),0)),"")

    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...
    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

  7. #7
    Registered User
    Join Date
    03-26-2012
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: If two cells contain specific text, return text from third cell.

    Glenn, that worked perfectly! This also helped my computer from freezing up. Thank you!

  8. #8
    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,055

    Re: If two cells contain specific text, return text from third cell.

    Glad to have helped.

  9. #9
    Banned User!
    Join Date
    10-29-2012
    Location
    Europe
    MS-Off Ver
    2013, 2016
    Posts
    318

    Re: If two cells contain specific text, return text from third cell.

    You can try normal formula:
    In B2 copied across and down.
    =SUMPRODUCT((Data!$A$2:$A$10=$A2)*(ISNUMBER(SEARCH(B$1,Data!$B$2:$B$10)))*(Data!$C$2:$C$10))

  10. #10
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: If two cells contain specific text, return text from third cell.

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

+ 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. specific text in a cell should return a text in another cell
    By rao2016 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 10-01-2016, 07:46 AM
  2. [SOLVED] Set a text value of a cell if a series of cells contains any specific text string
    By tubasparky in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 09-18-2014, 09:45 AM
  3. [SOLVED] If cell contains specific text, return that text
    By kazphilips in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-12-2014, 09:41 AM
  4. excel return all cells containing in order if other cell contains specific text
    By vio.violeta in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-17-2014, 08:52 AM
  5. [SOLVED] If a cell contains a specific text than return a value
    By dcdeez in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 06-04-2013, 08:31 AM
  6. [SOLVED] Return specific text if a different text is contained anywhere in a range of cells
    By ciayers in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-06-2013, 05:54 PM
  7. Replies: 3
    Last Post: 06-20-2012, 07:16 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