+ Reply to Thread
Results 1 to 9 of 9

Max for a given month and year

  1. #1
    Registered User
    Join Date
    01-08-2015
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    10

    Max for a given month and year

    Hey all,

    So I have a spreadsheet displaying the highest hydro peak for each day of the year (So there is one value associated to each day of the year). What I am trying to do is run a MAX function to generate a table that associates the maximum daily value of the month with it's appropriate month. I've been tinkering with Max inside If functions but can't seem to nail it down.

    Help?

    Thanks,

    Mitch

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,699

    Re: Max for a given month and year

    OK, so assuming you have dates in A2:A366 and the max value in B2:B366 then try listing month numbers 1 to 12 in D2:D13 and then use this formula in E2

    =MAX(IF(MONTH(A$2:A$366)=D2,B$2:B$366))

    confirm with CTRL+SHIFT+ENTER and copy down to E13
    Audere est facere

  3. #3
    Registered User
    Join Date
    01-08-2015
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    10

    Re: Max for a given month and year

    It didn't work. I have 2 files open, and I need to reference the other file, so the formula won't quite match up.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Max for a given month and year

    Did you try to adjust the references to point to the other file instead?

    And, as pointed out, that is an ARRAY formula, needs to be entered using CTRL SHIFT ENTER, not just enter
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    01-08-2015
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    10

    Re: Max for a given month and year

    Yeah, it's the reference to the "d" column that I think is mixing me up. I have the 12 months in the worksheet with my data, not the new worksheet where the MAX values will be displayed. And yes, thank you, I made sure to press CTRL+SHIFT+ENTER.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Max for a given month and year

    upload samples of both files please

  7. #7
    Registered User
    Join Date
    01-08-2015
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    10

    Re: Max for a given month and year

    Example 1.xlsExample 2.xlsx

    So Example 1 is the Data sheet and Example 2 is the sheet that i wish to fill.

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Max for a given month and year

    If your name columns stay in the same order/sequence, try this...
    =MAX(IF('[Example 1.xls]Demand'!$A3:$A369=$A2,'[Example 1.xls]Demand'!B$3:B$369))
    copied down and across

  9. #9
    Registered User
    Join Date
    01-08-2015
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    10

    Re: Max for a given month and year

    Thanks so much for the help, kinda played around with the ideas that were mentioned and got it to work!

    Cheers

+ 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. Graphing dates by month/year with 2 bars per month/year
    By Ellpoyohlokoh in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 05-22-2014, 05:25 AM
  2. Replies: 3
    Last Post: 09-04-2013, 10:49 AM
  3. How to add Month-on-Month and Year-on-Year %Variance into a pivot table
    By emeritus1812 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 06-09-2013, 02:37 AM
  4. If Column A Month and Year = ColumnB Todays Month and Year then send email
    By HACCStaff in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-15-2013, 12:47 AM
  5. Current Year & Month Name, Previous Year & Month Name
    By mithesh in forum Excel General
    Replies: 9
    Last Post: 10-21-2011, 07:00 AM

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