+ Reply to Thread
Results 1 to 12 of 12

Expert help- design macro to format non-standard excel report

  1. #1
    Registered User
    Join Date
    09-25-2012
    Location
    Florida, United States
    MS-Off Ver
    Excel 2007
    Posts
    18

    Expert help- design macro to format non-standard excel report

    Hello All,

    I require the help of an expert! This is sort of a hail mary.. so here goes:

    We have a dated call logging system at our call center that provides us with an overview of agent login and logout information. My goal is to get the report formatted in a way that I could pivot the data and look into agent login/logout details. In short the format of the report doesn't lend it self to be pivoted. The system has reached 'End of life' and there's no one to support or to redesign the report. So I wanted to know if was possible to just write a script to massage the data into a simple table that could then be 'pivoted'

    Script would do the following:
    Add column headers: DATE RAWTIME TIMEBIN STATUS AGENT NOTREADY TOTALLOGIN
    Parse line of text that starts with 'Agent Login' and pull agent # and agent name (everything after the ':' )
    Delete Rows that start with 'Agent Login' and 'Initial Login'
    After first date fill out blank cells with the same date
    Fill out cells with time rounded into 30 minute bins in column C
    Calculate time between ready and not ready- put results in F column
    Put appropriate agent information in column E

    This is something I was trying to script but I'm stumped. I currently do all this manually but I sometimes make mistakes and would like to expedite the process.

    I've included a sample workbook with 2 sheets. Sheet 1 shows the raw data, and 'RESULTS' show what the report should look like after.

    please assist!
    Attached Files Attached Files

  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: Expert help- design macro to format non-standard excel report

    This should do it

    Please Login or Register  to view this content.
    Last edited by mike7952; 12-11-2012 at 07:38 PM.
    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
    Registered User
    Join Date
    09-25-2012
    Location
    Florida, United States
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Expert help- design macro to format non-standard excel report

    Getting a subscript out of range on this line of code
    Please Login or Register  to view this content.

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

    Re: Expert help- design macro to format non-standard excel report

    Are you running this on your uploaded workbook or another file?

  5. #5
    Registered User
    Join Date
    09-25-2012
    Location
    Florida, United States
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Expert help- design macro to format non-standard excel report

    I created a module in my personal.xls and running it from there.

    Where should I be running this?

    Thank you for the fast response Mike! I'm excited to see if this works.

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

    Re: Expert help- design macro to format non-standard excel report

    It should work from there. See if this works. Run the macro called abc.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    09-25-2012
    Location
    Florida, United States
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Expert help- design macro to format non-standard excel report

    Excellent it worked in the sheet you attached. However I'm trying it on a larger sample on different worksheet and I'm getting the subscript out of range. How would you like to proceed?

  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: Expert help- design macro to format non-standard excel report

    Can you upload the wb that gives you the error as is.

  9. #9
    Registered User
    Join Date
    09-25-2012
    Location
    Florida, United States
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Expert help- design macro to format non-standard excel report

    See attached
    Attached Files Attached Files

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

    Re: Expert help- design macro to format non-standard excel report

    Ok give this a try

    Please Login or Register  to view this content.

  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: Expert help- design macro to format non-standard excel report

    Ok give this a try

    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    09-25-2012
    Location
    Florida, United States
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Expert help- design macro to format non-standard excel report

    Excellent! That's working!

    1 issue I did see is the 'AGENT' column on the results need a 'TRIM' of the leading space. So I did the following:

    Please Login or Register  to view this content.
    That seemed to work- not sure if that was the correct thing to do.

    Now for the last part- Do you have any suggestions on how to calculate the time someone spends 'Not Ready'

    P.S. Clean up your private messages-- can't send you a response!

+ 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