+ Reply to Thread
Results 1 to 16 of 16

Counting and Grouping macro help

  1. #1
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Counting and Grouping macro help

    Hi. Attached is a sample workbook.

    In sheet 'Games' I want something to look at the dates in column B and also look at column L(column L titled Importance). So in the workbook attached for the date 19/11/12 it would return 1 game with importance '4'. Then for the date 20/11/12 it would return 13 games with various importance. I want the results displayed so that I can then click into the 13 games and it then sub-catergorises by the time in column E.

    I want it to be used for a tool to see how many games are on a date of what importance and what time they start at.

    Any help would be great.


    Counting.xlsx

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Counting and Grouping macro help

    can you show your expected output?
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Re: Counting and Grouping macro help

    Counting.xlsx

    Here is the updated sample file with the output I want. I have only produced the sample output for the first 2 dates but you will be able to see what I'm after.

  4. #4
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Re: Counting and Grouping macro help

    Anyone able to help me out with the output I want in the sample file I've attached directly above?

  5. #5
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Counting and Grouping macro help

    This is close but Im not sure how to handle 00:30

    Please Login or Register  to view this content.

  6. #6
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Re: Counting and Grouping macro help

    That does a great job Mike. Much appreciated. Any work around for the 00:30?

  7. #7
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Re: Counting and Grouping macro help

    I'm flexible and can easily change the times. I could change it to 23:00 - 03:00 or something similar if that would help?

  8. #8
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Counting and Grouping macro help

    Try changing the 01:00 in the aheaders aheaders at the top of the code to 00:00

  9. #9
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Counting and Grouping macro help

    Im not sure because 00:30 is not >=23:00 and <=03:00. Im not great with working with times.

  10. #10
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Re: Counting and Grouping macro help

    Does the trick

    Excellent. I still need to edit it to exactly what I need but what you've created is such a massive help!

  11. #11
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Counting and Grouping macro help

    If you didnt want the formulas to show you can do this. Also add application.screenupdating false/true will speed things up a little

    Please Login or Register  to view this content.

  12. #12
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Re: Counting and Grouping macro help

    Where exactly do I put that line of code Mike? The code so that the formulas don't show.

  13. #13
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Counting and Grouping macro help

    Please Login or Register  to view this content.

  14. #14
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Re: Counting and Grouping macro help

    That's what I thought. But when I do it, it returns everything as 0.

  15. #15
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Re: Counting and Grouping macro help

    Nevermind. I'll just write a simple copy and paste special macro to overwrite the formulas!

  16. #16
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Counting and Grouping macro help

    Try adding a single quote before and after the worksheet name Games in the formulas.

    'Games'!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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