+ Reply to Thread
Results 1 to 7 of 7

Problem with a MAX(IF) matrix

  1. #1
    Registered User
    Join Date
    06-29-2015
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Office 365
    Posts
    3

    Problem with a MAX(IF) matrix

    Hi!

    I got a problem with attached file. Øvningsark.xlsx I need to calculate the max number i C for each Cpr (A). I tried =+MAX(IF($A$3:$A$50=A4;$C$3:$C$50)) - but it didn't work for every line. Just for 60% of it..

    Anyone has an idea?
    Thanks
    Jen

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Problem with a MAX(IF) matrix

    Hi
    get rid of the merged cells in col A and enter the values cell by cell. That should solve it

    ( and forget about merged cells in the future except for cosmetic purposes)

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

    Re: Problem with a MAX(IF) matrix

    The main problem is the merged cells in column A. In any cell other than the "top" merged cell, Excel finds a value of zero and then gives the wrong answer. CAn you get rid of the merged cells (they're a TOTAL disaster in most circumstances)? The formula also needs to be entered as an array (with CTRL-SHIFT-ENTER, not just ENTER).
    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
    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,053

    Re: Problem with a MAX(IF) matrix

    Here's a way using a helper column (which could be hidden).
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Problem with a MAX(IF) matrix

    Get rid of the merged cells.

    After that run this VBA code to fill the table.

    Please Login or Register  to view this content.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  6. #6
    Registered User
    Join Date
    06-29-2015
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Office 365
    Posts
    3

    Re: Problem with a MAX(IF) matrix

    Thx a lot all of you! Really helpful! Have a nice day :D

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

    Re: Problem with a MAX(IF) matrix

    Glad to have helped! 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 those 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. matrix problem
    By olddad in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-15-2013, 09:32 PM
  2. [SOLVED] matrix problem
    By simone77 in forum Excel General
    Replies: 3
    Last Post: 05-24-2012, 06:46 AM
  3. Matrix problem
    By stianabra in forum Excel General
    Replies: 5
    Last Post: 09-22-2010, 03:16 PM
  4. Matrix formula problem
    By don.harvey in forum Excel General
    Replies: 2
    Last Post: 09-10-2009, 08:20 AM
  5. Matrix Problem
    By Jeff in forum Excel General
    Replies: 1
    Last Post: 02-04-2006, 03:40 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