+ Reply to Thread
Results 1 to 5 of 5

Max(if); Finding max number based on criteria

  1. #1
    Registered User
    Join Date
    11-12-2019
    Location
    New York
    MS-Off Ver
    2016
    Posts
    16

    Exclamation Max(if); Finding max number based on criteria

    Hi All,

    I have a data-set that has weekly historical running total data. I have to do an analysis that ties in said weekly data with other data that was recorded monthly. In order to be able to do this I would have to pull data for the last week of each month, however, I am having trouble creating a formula that would do that.

    I’ve attached a rudimentary example of the data set to this post.

    The data-set has a Location, Period, Year, Week, and Data columns.

    Originally I originally tried finding the “max” week number (which would be either 4 or 5 depending on period) using a =max(if) (formula found in column F) comparing the location, period, and year. But that formula would always spit out 5 since it looked at the entire data-set rather the specific location, period, and year.


    I’m running office 16 which doesn’t have the maxifs capability yet.



    Any help would be greatly appreciated!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Max(if); Finding max number based on criteria

    Enter your formula with ctrl+shft+ent.
    It'll work as an array formula.
    Excel will put {} brackets around the formula.
    1. Click on the * Add Reputation if you think this helped you
    2. Mark your thread as SOLVED when question is resolved

    Modytrane

  3. #3
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: Max(if); Finding max number based on criteria

    polishfc, one comment. Wrong way to use whole column range for array formula. Use range such a1:a28 or A1:100 even a1:10000 but not A:A.

    also, non array formula could be used =AGGREGATE(16;6;D2:D28/(B2:B28=B2)/(A2:A28=A6);1)

  4. #4
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Max(if); Finding max number based on criteria

    Another way (non-array)..

    =MAX(INDEX(($A$2:$A$28=A2)*($B$2:$B$28=B2)*$D$2:$D$28,0))
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  5. #5
    Registered User
    Join Date
    11-12-2019
    Location
    New York
    MS-Off Ver
    2016
    Posts
    16

    Re: Max(if); Finding max number based on criteria

    Thanks for the input everyone, appreciate the help. I ended up using =MAX(INDEX()) formula that

+ 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. finding row number in other workbook meeting 2 criteria
    By Menolly4 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-21-2015, 08:23 AM
  2. [SOLVED] looking up & then finding average based on different criteria
    By VBAhelp3456 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-09-2015, 01:14 AM
  3. Finding last entry of data based on inquiry number and quotation number
    By arbelkasim in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-06-2014, 09:27 AM
  4. [SOLVED] Finding the largest number based on criteria
    By imerial in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-26-2013, 03:19 PM
  5. Excel 2007 : Finding a value based on 4 criteria
    By jws1976 in forum Excel General
    Replies: 2
    Last Post: 08-27-2011, 02:08 AM
  6. finding the first number in list that meets criteria
    By robert111 in forum Excel General
    Replies: 4
    Last Post: 02-20-2009, 12:05 PM
  7. [SOLVED] Finding the Largest Number, based on two criteria
    By BigH in forum Excel General
    Replies: 1
    Last Post: 02-08-2006, 04:55 PM

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