+ Reply to Thread
Results 1 to 7 of 7

When one cell equals value of another cell, then third cell displays text of fourth cell?

  1. #1
    Registered User
    Join Date
    01-18-2013
    Location
    NM
    MS-Off Ver
    Excel 2007
    Posts
    15

    When one cell equals value of another cell, then third cell displays text of fourth cell?

    Crazy right!


    I'll try to keep this a short and to the point as possible.

    If any cell in range A1:A5 = the numeric value of D1, then C1 displays the text of B1:B5, where B1:B5 is the name of the cells A1:A5.

    Ex: D1 is set to 11. A3 is set to 11. B3 is set to "Steve". C1 would need to display "Steve".
    D1 is set to 22. A5 is set to 22. B5 is set to "Frank". C1 would need to display "Frank".

    I already have this formula working but i need to add the ability to set D1 to any number i choose and then have the formula look for that number in A1:A5 and return the name in C1.
    =IFERROR(IFERROR(INDEX(A1:A5, MATCH(10, B1:B5, 0)), INDEX(A1:A5, MATCH(20, B1:B5, 0))), "")

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: When one cell equals value of another cell, then third cell displays text of fourth ce

    Try it like this...

    =IFERROR(VLOOKUP(D1,A1:B5,2,0),"")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    01-18-2013
    Location
    NM
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: When one cell equals value of another cell, then third cell displays text of fourth ce

    OK, that works for my example but i'm having trouble translating it in to my actual project. I guess i should have just used my real cells and values to begin with.

    D1 is actually P3. C1 (where the formula is entered) is actually AD1. The range where the numbers are is actually B8:I8 and the names of those cells are right above that in B6:I6.

    I'm guessing your formula doesn't work because it's looking in a column where as my names and numbers are in a row. I tried adapting it but i can't get it to work.

    Sometimes my making things "as short and to the point as possible" ends up making things harder!

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: When one cell equals value of another cell, then third cell displays text of fourth ce

    Ok, try this one...

    =IFERROR(INDEX(B6:I6,MATCH(P3,B8:I8,0)),"")

  5. #5
    Registered User
    Join Date
    01-18-2013
    Location
    NM
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: When one cell equals value of another cell, then third cell displays text of fourth ce

    Tony...you are the man!

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: When one cell equals value of another cell, then third cell displays text of fourth ce

    You're welcome!

  7. #7
    Registered User
    Join Date
    01-11-2021
    Location
    Accra
    MS-Off Ver
    Windows 8.1 Pro
    Posts
    1

    Post Re: When one cell equals value of another cell, then third cell displays text of fourth ce

    Hello,

    I would like a formula that Returns/Displays the Values of Column(Variable)of SET B in Column (Variable)of SET A
    if the NAME in SET A Equals the Name in SET B.

    If any cell in range C6:C13 = any cell in C17:C23, then D6:D13 displays the corresponding text of D17:D23.

    I hope the description of help I need is clear.


    Thanks.

+ 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