+ Reply to Thread
Results 1 to 6 of 6

Slight problem with Arrays Formula

  1. #1
    Registered User
    Join Date
    08-24-2012
    Location
    basel
    MS-Off Ver
    Excel 2003
    Posts
    23

    Slight problem with Arrays Formula

    Basically, I have 2 small tables (columns L-N) which show the results from a formula i was previously given and (columns P-R) which are the expected results that should have been returned. There is one error (highlighted red) and i have no idea why.

    Any ideas?

    Thanks

    Adam
    Attached Files Attached Files

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Slight problem with Arrays Formula

    =INDEX($G$4:$G$1000,MATCH(MIN(IF($F$4:$F$1000=L4,$D$4:$D$1000)),$D$4:$D$10000,0))

    Array formula.

    I saw your other thread earlier that ben offerrd you that solution. Your expected results for LAw in that thread were not correct. Did they?
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Slight problem with Arrays Formula

    Hi Adam,

    You need to change the reference to min if you wish to obtain minimum values, see revised formula which is fetching 09:00 :-


    =INDEX($G$4:$G$100000,MATCH(MIN(IF($F$4:$F$100000=$L4,$D$4:$D$100000))&$L4,$D$4:$D$100000&$F$4:$F$100000,0))

    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  4. #4
    Registered User
    Join Date
    08-24-2012
    Location
    basel
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Slight problem with Arrays Formula

    Hi there,

    thanks for that. Yes, I posted an earlier thread which worked, but after closer inspection....i detected a few errors.
    Thanks for this new formula. It also looks great on first look, but actually it returns 5 correct results and 1 in-correct result (unless i am doing something wrong)
    the incorrect result is the high for the 15/12/2010. The result with your formula gives me a time of 21:00, when the correct result should be 20:00

    Do you get the same result, or have i dont something wrong?

    thanks for your time and help.

    Adam

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Slight problem with Arrays Formula

    No Adam. We don't get the same result.

    See your example sheet.
    Attached Files Attached Files

  6. #6
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Slight problem with Arrays Formula

    sorry about overlooking, Adam. Fotis' shorter version is a little risky if you have 2 different dates with the same High/Low. if you don't have such a scenario, then it'll be fine to use his shorter version.

    attaching my adjusted formula, which Dilipandey has done.
    Attached Files Attached Files

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

+ 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