+ Reply to Thread
Results 1 to 6 of 6

Compare value of cell to a range of cells, then return the value of a different cell

  1. #1
    Registered User
    Join Date
    07-31-2013
    Location
    San Francisco
    MS-Off Ver
    Excel 2010
    Posts
    6

    Unhappy Compare value of cell to a range of cells, then return the value of a different cell

    I would like to compare the value of cell G7 to a range of cells B7:F7. If G7 matches any of the cells in B7:F7, then I want I7 to return the name of the cells located above the index cells B6:F6.

    Can anyone help with this? Hopefully I explained myself correctly. Thanks.


  2. #2
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Compare value of cell to a range of cells, then return the value of a different cell

    one way is index/match

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  3. #3
    Registered User
    Join Date
    07-31-2013
    Location
    San Francisco
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Compare value of cell to a range of cells, then return the value of a different cell

    Thanks! that was shorter with the long version I came up with: =IF($G10=$B10,$B$6,IF($G10=$C10,$C$6,IF($G10=$D10,$D$6,IF($G10=$E10,$E$6,IF($G10=$F10,$F$6)))))

    But with your formula and my formula, i have another problem. If Cells B7:F7 are blank, how do I get the formula to return a blank cell?
    Currently with your formula and my formula, if cell G7 is blank, cell I7 returns the data from B6.

    if it helps, the formula in G7 shows =MIN(B1:F7) which is the lowest amount shown in cells B7:F7
    Last edited by azucar360; 08-01-2013 at 01:35 PM. Reason: i didn't explain myself correctly

  4. #4
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Compare value of cell to a range of cells, then return the value of a different cell

    you can have an if statement
    = if(G7="","",index/match)

    DO you have to put a value in G7 i mean the min formula. you can put the min inside the index/match
    something like this.

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


    the bold part was the formula in G7

  5. #5
    Registered User
    Join Date
    07-31-2013
    Location
    San Francisco
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Compare value of cell to a range of cells, then return the value of a different cell

    Totally cool, that worked too!!

    I also found that this worked as well: =IFERROR(IF(G9="","",INDEX($B$6:$F$6,MATCH($G9,$B9:$F9,0))),"")

    Thanks for your help!

  6. #6
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Compare value of cell to a range of cells, then return the value of a different cell

    Your welcome.

+ 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. Replies: 0
    Last Post: 05-22-2013, 04:40 AM
  2. Replies: 3
    Last Post: 01-02-2013, 10:06 PM
  3. Replies: 6
    Last Post: 05-30-2012, 03:09 PM
  4. [SOLVED] Compare two cells and return certain value in third cell
    By hurairah in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-19-2006, 02:40 AM
  5. compare cell with a range of cells
    By spencermjax in forum Excel General
    Replies: 0
    Last Post: 01-15-2005, 11:22 PM

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