+ Reply to Thread
Results 1 to 7 of 7

Max Weekend Value, display date value was seen

  1. #1
    Registered User
    Join Date
    05-24-2012
    Location
    Windsor, Ontario
    MS-Off Ver
    excel 2010
    Posts
    7

    Max Weekend Value, display date value was seen

    Hey,

    I have 2 columns populated with data
    Column A = Date
    Column B = Value

    I have my sheet already finding and highlighting the weekend days, but I need to find the Max value that is seen only on a weekend.
    I have to do this for every month so the weekend days are at different spots of each month.

    Also when it finds the maximum value I need it to display the date that it occurred on in a cell next to it.

    Any help would be great, I've been looking through forums for the past 2 days with no help.

    Thanks,
    Attached Files Attached Files

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Max Weekend Value, display date value was seen

    johnjacob,

    Attached is a modified version of your posted workbook.

    I created 2 named ranges to avoid errors when performing the Weekday() function.
    The first named range is for the days and I named it rngDays. Here is the formula it uses:
    Please Login or Register  to view this content.
    The second named range is for the values and I named it rngValues. here is the formula it uses:
    Please Login or Register  to view this content.

    In cell J6 and J8 are array formulas. Note that array formulas must be entered with Ctrl+Shift+Enter and not just Enter.
    The array formula in J6:
    Please Login or Register  to view this content.
    The array formula in J8:
    Please Login or Register  to view this content.

    Lastly, to get the corresponding dates, I used Index/Match. Index/Match is a regular formula.
    For the weekend max:
    Please Login or Register  to view this content.
    For the weekend min:
    Please Login or Register  to view this content.
    For the Month Max:
    Please Login or Register  to view this content.
    For the Month Min:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    05-24-2012
    Location
    Windsor, Ontario
    MS-Off Ver
    excel 2010
    Posts
    7

    Re: Max Weekend Value, display date value was seen

    Tigeravatar,

    It actually amazes me how easy that was for you. And how much I truly don't know about Excel.

    Thank you so much worked perfectly!

  4. #4
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Max Weekend Value, display date value was seen

    You're very welcome

  5. #5
    Registered User
    Join Date
    05-24-2012
    Location
    Windsor, Ontario
    MS-Off Ver
    excel 2010
    Posts
    7

    Re: Max Weekend Value, display date value was seen

    I have another question, I have multiple sheets on each workbook and when I copy the formulas to the next sheet it only works to find max/min of hte month not of the weekends. I get the #Value error, and i hit Ctrl+Shift+Enter when I'm done. What do I need to change so that it is consist on each sheet?

    I don't know where I'm supposed to put your 2 codes where you make the ranges? I just made my own ranges on each page by selecting each column and naming it.

  6. #6
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Max Weekend Value, display date value was seen

    To create a named range, you can go to the Formulas tab on the ribbon and then click Name Manager.

    Here's some links to information on creating dynamic named ranges:
    http://support.microsoft.com/kb/830287
    http://office.microsoft.com/en-us/ex...001126115.aspx
    http://www.contextures.com/xlNames01.html#Dynamic
    http://www.cpearson.com/Excel/excelF.htm#DynamicRanges

  7. #7
    Registered User
    Join Date
    05-24-2012
    Location
    Windsor, Ontario
    MS-Off Ver
    excel 2010
    Posts
    7

    Re: Max Weekend Value, display date value was seen

    Great thanks again!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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