+ Reply to Thread
Results 1 to 5 of 5

Index match with two criteria, one closest value and one specific

  1. #1
    Registered User
    Join Date
    10-10-2013
    Location
    ljubljana
    MS-Off Ver
    excel 2010
    Posts
    3

    Index match with two criteria, one closest value and one specific

    Hi,

    I have a problem with using index match function where one criteria will always be exact match and exact or closest value.

    Capture.PNG

    I want a function which returns me the value closest to zero (or zero in some cases) for every hour in a day (there is always a different number of rows for each hour). I have been trying with the index match function where one match criteria was for the closest value (number closest to zero) and other for finding the specific hour. The problem is, if I select the whole column of number and use MIN(ABS(column-0) for the match function, that value is always zero (because at least one hour has some value zero). And if other hours don't have the zeros in some rows, I get NA.. I need to define matching value for each hour separately somehow.. I hope you understand the problem. Attached is also an example in excel.

    Regards,
    Rok
    Attached Files Attached Files

  2. #2
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: Index match with two criteria, one closest value and one specific

    Hello and welcome.
    What's your formula and where do you use it?(which cell is the lookup)
    If you are http://www.excelforum.com/image.php?type=sigpic&userid=125481&dateline=1392355029happy with the results, please add to the contributor's
    reputation by clicking the reputation icon (star icon).




    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.
    To undo, select Thread Tools-> Mark thread as Unsolved.
    http://www.excelaris.co.uk

  3. #3
    Registered User
    Join Date
    10-10-2013
    Location
    ljubljana
    MS-Off Ver
    excel 2010
    Posts
    3

    Re: Index match with two criteria, one closest value and one specific

    Hi,

    I was at home when I posted the first post, so I didn't have the excel file and I have just created an example. Attached is now the real excel file with formulas and everything.

    http://s000.tinyupload.com/?file_id=...67883359428115 (the file is too big for the forum)

    Thank you for your help. Let me know if you need some additional explanation about the problem itself.

    Rok

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Index match with two criteria, one closest value and one specific

    Ausc, if the file is too big, remove anything that does not relate to your question, and leave only enough data to show what you want. Many members are unable (company firewalls and stuff) or unwilling to download files from web-hosting sites
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    10-10-2013
    Location
    ljubljana
    MS-Off Ver
    excel 2010
    Posts
    3

    Re: Index match with two criteria, one closest value and one specific

    You are right.

    Regards
    Attached Files Attached Files

+ 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. Index closest match
    By MJSlattery in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-16-2013, 10:27 PM
  2. [SOLVED] Index-Match Closest Value
    By CzechCzar in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-25-2013, 07:40 PM
  3. Replies: 2
    Last Post: 09-25-2013, 07:18 PM
  4. Match the Upper closest value using Index Match.
    By adnanaddo in forum Excel General
    Replies: 3
    Last Post: 01-16-2013, 02:47 AM
  5. Index/Match Formulas - Search/Filter Based on Specific Criteria
    By Christopher.Belanger in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-10-2012, 08:42 AM

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