+ Reply to Thread
Results 1 to 9 of 9

Vlookup an equation result

  1. #1
    Registered User
    Join Date
    08-22-2017
    Location
    Sweden
    MS-Off Ver
    2010
    Posts
    4

    Unhappy Vlookup an equation result

    I cant find a solution around this

    Description of the problem is on the first sheet in red font

    I want to look up what is the closest value to cell C15 (Highlighted in Red) from sheet 2 column (J) TMP Blue and return the value from the same raw but from Column (I)
    Every time I try it, it gives me the closest value to C14 from Column (I) instead of the value from the same RAW
    For example if I have a value of 3 in C14, it would look up value 2.9 from column (J) and return 2.5 from column (I) instead of 20

    Thanks
    Last edited by Usama87; 08-22-2017 at 06:57 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,798

    Re: Vlookup an equation result

    Please explain the issue in your post as well as in the workbook. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    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,036

    Re: Vlookup an equation result

    try:

    =VLOOKUP(C15, Sheet2!I2:J16, 2,1)
    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

  4. #4
    Registered User
    Join Date
    08-22-2017
    Location
    Sweden
    MS-Off Ver
    2010
    Posts
    4

    Re: Vlookup an equation result

    Glenn

    it doesnt work, it returns 3 and I want it to return 20 (from the column Fronius Size)

  5. #5
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Vlookup an equation result

    He's looking up the first column as column J but wants to return the value in column I whcih you cant do in a straight VLOOKUP.
    For approximate value the data has to be sorted in ascending order it would seem.

    You probably want some form of

    INDEX(I2:I16,MATCH(...),1)
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  6. #6
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Vlookup an equation result

    This works without sorting but may fail if there are duplicate values in column J or you have long/recurring decimals

    =INDEX(Sheet2!I2:I16,MATCH(C15+MIN(Sheet2!J2:J16-C15),Sheet2!J2:J16,0),1)
    Array formula, use Ctrl-Shift-Enter
    Last edited by Special-K; 08-22-2017 at 07:28 AM.

  7. #7
    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,036

    Re: Vlookup an equation result

    Use this array formula:

    =INDEX(Sheet2!$I$2:$I$16,MATCH(MIN(ABS(Sheet2!$J$2:$J$16-$C$15)),ABS(Sheet2!$J$2:$J$16-$C$15),0))

    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    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...

  8. #8
    Registered User
    Join Date
    08-22-2017
    Location
    Sweden
    MS-Off Ver
    2010
    Posts
    4

    Re: Vlookup an equation result

    Thanks everyone, it worked, most of the suggestions worked.


  9. #9
    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,036

    Re: Vlookup an equation result

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

+ 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. Showing an equation result in cell
    By Tickets in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 04-08-2016, 09:16 AM
  2. Equation Not Producing the correct result
    By boynejs in forum Excel General
    Replies: 7
    Last Post: 02-12-2016, 10:31 PM
  3. Equation in One Cell, Result in Another
    By Joe Gahona in forum Excel General
    Replies: 1
    Last Post: 01-06-2011, 12:49 PM
  4. How to get the result of an equation in a cell
    By Bart1969 in forum Excel General
    Replies: 11
    Last Post: 05-13-2009, 11:34 AM
  5. Equation to Provide Result Based on 2 Columns
    By Cincy in forum Excel General
    Replies: 3
    Last Post: 02-19-2008, 01:45 AM
  6. using a result from a web lookup in an equation
    By Steve E in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-31-2006, 01:03 PM
  7. How to make one column be the result of an equation between two
    By dcnguyen in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 01-08-2006, 08:35 PM

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