+ Reply to Thread
Results 1 to 21 of 21

Index/Match wrong?

  1. #1
    Registered User
    Join Date
    07-08-2015
    Location
    Bratislava
    MS-Off Ver
    2013
    Posts
    47

    Index/Match wrong?

    Hi guys,

    as per attached file, Im trying to get the Region (in yellow) based on array Index/Match formula, but likely Im doing something wrong.

    The Region should reflect the minimum value for each Material nr (column A).

    Could you please help?

    Many thanks!
    Lukas
    Attached Files Attached Files

  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,780

    Re: Index/Match wrong?

    In K3 copied down:

    =INDEX($B$1:$I$1,0,MATCH(J3,$B$3:$I$3,0))

    Why is your attachment entitled 'Mr Excel'???
    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 Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Index/Match wrong?

    in J3
    =MIN(B3:I3)
    in K3
    =INDEX(B$1:I$1,1,MATCH(J3,B3:I3,0))
    and copy down the columns
    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.

  4. #4
    Registered User
    Join Date
    07-08-2015
    Location
    Bratislava
    MS-Off Ver
    2013
    Posts
    47

    Re: Index/Match wrong?

    Oh, this was the issue..., sorry about that. When I ask, I usually do it here or Mr.Excel and now I have named the file wrongly...

    Thanks for the formula however, thats not exactly Im looking for as it doesnt reflect the minimum value on Material nr. level - I need to catch all values with the same material nr.
    The yellow column reflects the correct solution.

  5. #5
    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,025

    Re: Index/Match wrong?

    iN j3, AN ARRAY FORMULA, COPIED DOWN:

    =MIN(IF($A$3:$A$13=A3,$B$3:$I$13))

    iN k3, COPIED DOWN:


    =INDEX($A$1:$I$1,,SUMPRODUCT(($B$3:$I$13=J3)*COLUMN($B$3:$I$13)))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...
    Attached Files Attached Files
    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

  6. #6
    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,025

    Re: Index/Match wrong?

    Ignore the bit about the MIN. Sp-K is correct:

    =MIN(B3:I3) is fine.

  7. #7
    Registered User
    Join Date
    07-08-2015
    Location
    Bratislava
    MS-Off Ver
    2013
    Posts
    47

    Re: Index/Match wrong?

    ..so this was "a bit" more complicated than I thought )

    Works great, many thanks!!!
    Last edited by AliGW; 07-25-2017 at 07:36 AM. Reason: Unnecessary quotation removed.

  8. #8
    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,025

    Re: Index/Match wrong?

    Another bad hair day. Ignore my post at #6. You DO need the array formula. My original Post (#5) is correct.

  9. #9
    Registered User
    Join Date
    07-08-2015
    Location
    Bratislava
    MS-Off Ver
    2013
    Posts
    47

    Re: Index/Match wrong?

    Glenn, your formula is working fine in the example file but not anymore in my original file with slightly different structure, although I have adapted the ranges to my original file.
    Does the structure of the sheet/table matters in your formula?

  10. #10
    Registered User
    Join Date
    07-08-2015
    Location
    Bratislava
    MS-Off Ver
    2013
    Posts
    47

    Re: Index/Match wrong?

    This is the file with the full structure
    Attached Files Attached Files

  11. #11
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Index/Match wrong?

    Enter in W3 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by AlKey; 07-25-2017 at 08:16 AM.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  12. #12
    Registered User
    Join Date
    07-08-2015
    Location
    Bratislava
    MS-Off Ver
    2013
    Posts
    47

    Re: Index/Match wrong?

    Perfect, Thank you!!

  13. #13
    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,025

    Re: Index/Match wrong?

    =INDEX($A$1:$U$1,SUMPRODUCT(($N$3:$U$8391=V3)*COLUMN($N$3:$U$8391)))

    an ordinary formula...

  14. #14
    Registered User
    Join Date
    07-08-2015
    Location
    Bratislava
    MS-Off Ver
    2013
    Posts
    47

    Re: Index/Match wrong?

    Guys, I have now a different issue, I was hoping I will be able to do that, but Im not.. :/

    I need to add volumes (columns F-M) to column X (solution in yellow)

    could you please help me with this one also?
    Attached Files Attached Files

  15. #15
    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,780

    Re: Index/Match wrong?

    Lugashz - what have you tried based on what you have learnt so far in this thread? I would expect you to spend a bit more than 16 minutes on it yourself before asking for help again ...

    Please tell us what you have tried, but that has failed.

  16. #16
    Registered User
    Join Date
    07-08-2015
    Location
    Bratislava
    MS-Off Ver
    2013
    Posts
    47

    Re: Index/Match wrong?

    Ali, I see your point.., I was hoping to get it with simple Hlookup, but thats obviously not possible due to other factors. I dont see a use of the formulas in this thread for this particular exercise.
    I like to work with Excel, discover new functions, Im able to adapt formulas, which were suggested to me in the past, but Im simply not an Excel expert and not able to make up a formula, which I have not used before. I hope its understandable.

  17. #17
    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,780

    Re: Index/Match wrong?

    That's how I and many other people here have learned: by TRYING to use bits of other formulae we've been given to come up with new ones. That's how you get better. So, once again, what have you actually tried? Paste your attempted formula here and explain how it isn't quite doing what you want.

  18. #18
    Registered User
    Join Date
    07-08-2015
    Location
    Bratislava
    MS-Off Ver
    2013
    Posts
    47

    Re: Index/Match wrong?

    I havent tried anything, as I have no clue what should I try.
    Believe me, I have learned a lot from this forum, but simply I dont know how to make up a formula, which is at least similar to what I did before.

  19. #19
    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,025

    Re: Index/Match wrong?

    Array formula in V4:
    =MIN(IF($A$4:$A$19=A4,$N$4:$U$19))

    Ordinary formula in W4 (tidied up a bit to make it easier to replicate):
    =INDEX($N$2:$U$2,SUMPRODUCT(($N$4:$U$19=V4)*(COLUMN($N$4:$U$19)-COLUMN($N$4)+1)))

    Ordinary formula in X4:
    =INDEX($F$1:$M$19,SUMPRODUCT(($N$4:$U$19=V4)*ROW($N$4:$U$19)),SUMPRODUCT(($N$4:$U$19=V4)*(COLUMN($N$4:$U$19)-COLUMN(N4)+1)))
    Attached Files Attached Files

  20. #20
    Registered User
    Join Date
    07-08-2015
    Location
    Bratislava
    MS-Off Ver
    2013
    Posts
    47

    Re: Index/Match wrong?

    Thanks Glenn,

    I have just managed to solve it through Concatenate/Pivots and Vlookups

  21. #21
    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,780

    Re: Index/Match wrong?

    Well done!

+ 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. [SOLVED] =INDEX($N$3:$Q$100,MATCH(1,($A$2=$N$2:$N$100)*($B$2=$Q$2:$Q$100),0)) what wrong
    By hktom in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-07-2015, 11:10 PM
  2. [SOLVED] Index/Match wrong result
    By spinkung in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-14-2015, 05:20 AM
  3. [SOLVED] Row and column match? (IF INDEX MATCH) What am I doing wrong.
    By Noop1887 in forum Excel General
    Replies: 2
    Last Post: 01-04-2015, 09:16 AM
  4. [SOLVED] Index and Match... I'm pretty sure I'm just doing it wrong
    By rstarr1 in forum Excel General
    Replies: 2
    Last Post: 10-13-2014, 05:40 PM
  5. [SOLVED] What's wrong with this Index Match/Row formula?
    By DaveBre in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-25-2014, 08:37 PM
  6. [SOLVED] Index Match Question - What am I doing wrong?
    By JackieAdams in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-27-2012, 04:43 PM
  7. Index and Match-wrong value
    By Steved in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-13-2005, 07:06 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