Results 1 to 5 of 5

Thread: Find Value within Datarange

  1. #1
    Neophyte mfaisal.ce's Avatar
    Join Date
    Nov 2021
    Posts
    1
    Articles
    0
    Excel Version
    2010

    Find Value within Datarange



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hello,

    I am trying to find a value between a range but unable to do that, i tried Index & match combination too but unable....

    Level 0 10 20 30 40 50 60 70 80 90 100
    Volume 0 0.34 0.97 1.75 2.63 3.55 4.47 5.35 6.13 6.76 7.1

    I need to find Volume when Level will be 35? I want to use Level and Volume in dynamic range....

    Please give me the solution....

    regards,

  2. #2
    Administrator AliGW's Avatar
    Join Date
    Nov 2015
    Location
    Ipswich, Suffolk, England
    Posts
    1,762
    Articles
    0
    Excel Version
    MS365 Sub (Insider) Win11
    You probably need to set the MATCH TYPE argument to 1:

    =INDEX(result_range,MATCH(lookup_value,lookup_range,1))

    https://exceljet.net/excel-functions...match-function
    Ali
    Enthusiastic self-taught user of MS Excel!

  3. #3
    Super Moderator Bob Phillips's Avatar
    Join Date
    Mar 2011
    Posts
    1,938
    Articles
    0
    Excel Version
    O365
    Or maybe you want the trend

    =TREND(result_range,lookup_range,lookup_value)

  4. #4
    Super Moderator p45cal's Avatar
    Join Date
    Dec 2012
    Posts
    2,115
    Articles
    0
    Excel Version
    365
    To do this one to death…
    If you use the TREND formula using all the data, sometimes the results will be significantly off because the relationship is not a straight line:
    Click image for larger version. 

Name:	2021-11-29_124842.png 
Views:	6 
Size:	27.0 KB 
ID:	10717

    using the chart, you'd expect a volume of roughly 2.2 for level 35.

    Using a straight line through all the points you get 2.55 (dotted line on chart)
    Formula:
    =TREND(D2:D12,C2:C12,F3,FALSE)

    You can get better results using the small straight line between the points directly before and after 35, this gives you 2.19
    Formula:
    =TREND(INDEX(D2:D12,MATCH(F3,C2:C12)):INDEX(D2:D12,MATCH(F3,C2:C12)+1),INDEX(C2:C12,MATCH(F3,C2:C12)):INDEX(C2:C12,MATCH(F3,C2:C12)+1),F3)
    or a bit shorter:
    =TREND(OFFSET(C2:C12,MATCH(F3,C2:C12)-1,1,2),OFFSET(C2:C12,MATCH(F3,C2:C12)-1,0,2),F3)

    You'll very likely get even better results using the fifth order polynomial (the what?) which is a good fit, which, surprisingly has a simpler (well, shorter) formula, and this gives you 2.18
    Formula:
    =SUMPRODUCT(LINEST(D2:D12,C2:C12^{1,2,3,4,5},FALSE),F3^{5,4,3,2,1,0})

    See attached workbook where you can alter the value in cell F3 (light green).

    Dead horse flogged.
    Attached Files Attached Files
    Last edited by p45cal; 2021-11-29 at 01:50 PM.

  5. #5
    Super Moderator p45cal's Avatar
    Join Date
    Dec 2012
    Posts
    2,115
    Articles
    0
    Excel Version
    365
    Oh groan…
    cross posted without links:
    https://www.excelforum.com/excel-for...datarange.html
    mfaisal.ce, for your information, you should always provide links to your cross posts.
    This is a requirement, not just a request.
    If you have cross posted at other places, please add links to them too.
    Why? Have a read of http://www.excelguru.ca/content.php?184

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •