+ Reply to Thread
Results 1 to 8 of 8

Creating periodic max values from daily values

  1. #1
    Forum Contributor mikehk's Avatar
    Join Date
    09-05-2017
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    483

    Creating periodic max values from daily values

    Kindly help me fix this formula
    =MAX(IF(YEAR($A$2:$A$104)=B2,IF($D$2:$D$104=D2,$E$2:$E$104))) + CSE

    My data range (based on daily values) is for few years and I would like to get values
    based on weekly, monthly, 3 month and 6 months.

    I attach a sample file

    Thank you.
    Attached Files Attached Files

  2. #2
    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
    52,933

    Re: Creating periodic max values from daily values

    Seeing as you already have the date broken down (yyyy mth wk), why not use those columns?
    =MAX(IF(($B$2:$B$104=B2)*($C$2:$C$104=C2),$E$2:$E$104))
    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

  3. #3
    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
    52,933

    Re: Creating periodic max values from daily values

    or just this...
    =MAX(IF((YEAR($A$2:$A$104)=YEAR(B2))*($C$2:$C$104=C2),$E$2:$E$104))
    you are pulling out the year from A, you need to do the same for B

  4. #4
    Registered User
    Join Date
    04-01-2019
    Location
    HK
    MS-Off Ver
    2010
    Posts
    32

    Re: Creating periodic max values from daily values

    In Column B (Year):
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    and set format to "General".

  5. #5
    Forum Contributor mikehk's Avatar
    Join Date
    09-05-2017
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    483

    Re: Creating periodic max values from daily values

    Quote Originally Posted by FDibbins View Post
    or just this...
    =MAX(IF((YEAR($A$2:$A$104)=YEAR(B2))*($C$2:$C$104=C2),$E$2:$E$104))
    you are pulling out the year from A, you need to do the same for B
    Thank you for your help, but sorry, both your formula didn't work.

    I have this non-array formula working

    this gives me max for the month
    =SUMPRODUCT(MAX(($A$2:$A$104=$B2)*($A$2:$A$104=$C2)*$E$2:$E$104))

    this formula for weekly values ...doesn't work
    =SUMPRODUCT(MAX(($A$2:$A$104=$B2)*($A$2:$A$104=$D2)*$E$2:$E$104))

    how do I tweak the formula to get max values for 3 & 6 months

    Please see the attached file.

    Thank you.
    Attached Files Attached Files

  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
    52,933

    Re: Creating periodic max values from daily values

    Quote Originally Posted by mikehk View Post
    Thank you for your help, but sorry, both your formula didn't work...
    Actually, they both DO work. Did you use CSE to enter them? I did not specify because you were already using CSE and figured you would continue to do so.


    I will take a look at the 3/6 month

  7. #7
    Forum Contributor mikehk's Avatar
    Join Date
    09-05-2017
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    483

    Re: Creating periodic max values from daily values

    Thank you FDibbins for your kind help. Happy with the sumproduct formula

    Is it possible to display results once per month. Kindly see the attached file for what I mean.
    Screenshot also attached...thank you so much. Happy holidays!
    Attached Images Attached Images
    Attached Files Attached Files

  8. #8
    Forum Contributor mikehk's Avatar
    Join Date
    09-05-2017
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    483

    Re: Creating periodic max values from daily values

    this is strange

    this formula works on the sample file but gives a #VALUE error on work file

    =SUMPRODUCT(MAX((YEAR(Table1[[Date]:[Date]])=Table1[@Year])*(Table1[[Month]:[Month]]=Table1[@Month])*Table1[[Rate]:[Rate]]))

    *fixed! there was an error in data*
    Last edited by mikehk; 04-20-2019 at 03:44 AM.

+ 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. Replies: 2
    Last Post: 06-19-2017, 04:51 AM
  2. Replies: 9
    Last Post: 03-27-2017, 10:45 AM
  3. Daily Max values with time values
    By r_man in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-27-2015, 04:09 PM
  4. Please Help converting MONTHLY values into DAILY Values
    By retropete in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-27-2014, 09:25 PM
  5. Find max value every day from multiple daily values (Solarpanels daily yield)
    By jakobscafe in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-08-2013, 09:20 AM
  6. select a range (season) of daily values in a long daily calendar
    By lobotomy in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 10-19-2012, 09:48 AM
  7. Replies: 6
    Last Post: 01-30-2009, 12:38 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