+ Reply to Thread
Results 1 to 7 of 7

Lookup a value in another tab and display a specific text value

  1. #1
    Registered User
    Join Date
    07-05-2013
    Location
    North Carolina
    MS-Off Ver
    Excel 2010
    Posts
    9

    Question Lookup a value in another tab and display a specific text value

    I am trying to find a formula to put into Sheet 1 column B. I need to match up the numbers from Sheet 1 column A to Sheet 2 column C and ONLY display the text from from Sheet 2 column D if it is "XXX."


    Example:

    Sheet 1:
    A
    B
    1 1111 (=Formula only show "XXX")
    2 2222 (=Formula only show "XXX")
    3 3333 (=Formula only show "XXX")
    4 4444 (=Formula only show "XXX")



    Sheet 2:
    C
    D
    1 1111 XXX
    2 2222 YYY
    3 3333 ZZZ
    4 4444 XXX

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Lookup a value in another tab and display a specific text value

    crachelle04,

    Give this a try:
    =IF(COUNTIF(Sheet2!C:C,A1)>0,IF(VLOOKUP(A1,Sheet2!C:D,2,0)="XXX","XXX",""),"")
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Lookup a value in another tab and display a specific text value

    =SUMPRODUCT((Sheet2!$C$1:$C$8=Sheet1!B2)*(Sheet2!$D$1:$D$8="XXX"))
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  4. #4
    Registered User
    Join Date
    07-05-2013
    Location
    North Carolina
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Lookup a value in another tab and display a specific text value

    @tigeravatar

    Thank you that did it!
    Last edited by crachelle04; 07-09-2013 at 02:41 PM.

  5. #5
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Lookup a value in another tab and display a specific text value

    @crachelle04

    It's allways good to add to whom you responding.

    I think both solutions should work for you.

  6. #6
    Registered User
    Join Date
    07-05-2013
    Location
    North Carolina
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Lookup a value in another tab and display a specific text value

    [QUOTE=oeldere;3315272]

    I did not know how to do that. I clicked right under the comment and clicked Reply so I thought that was how you did it sorry.

  7. #7
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Lookup a value in another tab and display a specific text value

    Yes that's all right, but you got 2 answers to your question.

    One from tigeravatar

    and one from Oeldere

    I would like to know "what did it".

    Maybe it's one solution, maybe (i guess) it's two solutions.

    You can refer to the name (@crachelle04) like I did in #5.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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