+ Reply to Thread
Results 1 to 12 of 12

Grouping a row of dates and times into weekly averages

  1. #1
    Registered User
    Join Date
    07-16-2018
    Location
    Australia
    MS-Off Ver
    Microsoft Office Plus 2016
    Posts
    21

    Question Grouping a row of dates and times into weekly averages

    Hi all,

    Newbie to excel here.

    I have a row of data that I need to work out daily averages in.

    The format for the cell is dd/mm/yyyy 00:00:00 AM or PM ie: 17/07/2018 08:14:33 AM

    Is there a formula that I can use to count how many entries per date but then also give me a weekly and daily average?

    What I was going to do was a column that returns which date is which day of the week and then calculating the total entries and diving by 4 (4 Saturdays in a month on average etc) but I dont think this is overly accurate.

    I was going to use
    =CHOOSE(WEEKDAY(A1),"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")

    Sidenote: How do I add an if statement to the above formula where if the formula is in a cell where there is no date in A1 that it returns nothing? At the moment, even in blank cells, it's still returning 'Saturday'.

    Hopefully this makes sense.

    Thanks in advance and hello from Australia!

  2. #2
    Registered User
    Join Date
    07-16-2018
    Location
    Australia
    MS-Off Ver
    Microsoft Office Plus 2016
    Posts
    21

    Re: Grouping a row of dates and times into weekly averages

    I've just discoverd WEEKNUM. Wondering if that might help?

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

    Re: Grouping a row of dates and times into weekly averages

    To best describe or illustrate your problem you would be better off attaching a dummy workbook. The workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    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

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Grouping a row of dates and times into weekly averages

    maybe, for the sidenote: =IF(A1="","",CHOOSE(WEEKDAY(A1),"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"))

  5. #5
    Registered User
    Join Date
    07-16-2018
    Location
    Australia
    MS-Off Ver
    Microsoft Office Plus 2016
    Posts
    21

    Re: Grouping a row of dates and times into weekly averages

    Thanks for the fast response all!

    I've attached a dummy workbook. Essentially I need to calculate instances per date and then group them daily.
    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,936

    Re: Grouping a row of dates and times into weekly averages

    Your dates/times are actually not real dates/times, but text, looking like dates/times (not the end of the world, just saying). Where are these coming from?

    Also, what would your expected outcome look like?

  7. #7
    Registered User
    Join Date
    07-16-2018
    Location
    Australia
    MS-Off Ver
    Microsoft Office Plus 2016
    Posts
    21

    Re: Grouping a row of dates and times into weekly averages

    True. It's an output from a system I am using.

    Ideally i would be able to find out how many instances per day and then have it also then arranged in a Sunday to Saturday format with averages per day underneath and then if possible, broken up into weeks as well.

  8. #8
    Registered User
    Join Date
    07-16-2018
    Location
    Australia
    MS-Off Ver
    Microsoft Office Plus 2016
    Posts
    21

    Re: Grouping a row of dates and times into weekly averages

    Attached is what I have so far (without weekly breakup). Averaging each days result by 4 doesn't seem overly accurate though.
    Attached Files Attached Files

  9. #9
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Grouping a row of dates and times into weekly averages

    Honestly I don't know what are you tryin' to do but maybe this (done with PowerQuery aka Get&Transform)
    If not I give up
    Attached Files Attached Files

  10. #10
    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,936

    Re: Grouping a row of dates and times into weekly averages

    I see that your sample file now references another file? Is that the way you will be doing this, or was that just for the sample?

    If you have the dates like you showed in your 1st sample, the 1st step is to convert the dates, which you can do like this...
    to convert to dates (I take it you dont really need the time?)
    highlight the entire range
    select Data tab/Text2Columns
    click next/next/select Date and select DMY/Finish

  11. #11
    Registered User
    Join Date
    07-16-2018
    Location
    Australia
    MS-Off Ver
    Microsoft Office Plus 2016
    Posts
    21

    Re: Grouping a row of dates and times into weekly averages

    Sorry for the confusion all. I'll leave this one now as I have enough to go on.

    I'll make sure and be clearer next time and include a demo spreadsheet with examples of what I want to achieve.

    Thanks again.

  12. #12
    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,936

    Re: Grouping a row of dates and times into weekly averages

    So what did you settle on?

+ 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. [SOLVED] Grouping Dates into Days and times into Groups
    By mgmerv in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-28-2015, 05:49 AM
  2. Replies: 21
    Last Post: 05-11-2015, 03:53 PM
  3. Weekly Rolling Averages?!?!
    By lesandrews86 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-01-2013, 02:21 PM
  4. Converting weekly data with dates to montly averages
    By KorreSporre in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-12-2013, 08:57 AM
  5. [SOLVED] Grouping Daily dates into a weekly date
    By hnasir in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-07-2012, 07:54 PM
  6. Excel 2007 : Averages with dates and times
    By Cdo in forum Excel General
    Replies: 9
    Last Post: 08-17-2010, 02:35 PM
  7. Weekly/Monthly Averages
    By klindy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-14-2006, 04:24 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