+ Reply to Thread
Results 1 to 7 of 7

Better Output Method Help

  1. #1
    Registered User
    Join Date
    08-16-2016
    Location
    Illinois, USA
    MS-Off Ver
    Office 365
    Posts
    49

    Better Output Method Help

    Good Morning

    I am attempting to help a colleague with a report for work. I'm attaching a file with the data as it is exported from our system as well as after making some slight changes to simplify. What we are looking for is a way to calculate productive vs non productive hours per employee. The problem I'm running into is that the report is different every week based on the non productive codes that are used. Some weeks some codes are used, some are not, some are used more than others etc etc - so each week there are a different number of rows for each employee. I need a formula or macro that can be ran manually that will calculate and output the productive vs non productive hours. Some details regarding the attached spreadsheet:
    Tab 1: Raw Data - this is the data in it's raw form when it is exported from our Cisco system. Important columns are - The first column which contains employee names, the fourth column which contains telephone activity codes, and the fifth column which contains the duration for each preceding code.
    Tab 2: Formatted Data - this is the data after a macro is ran to simplify the reason codes from column four. It is simply changing the verbiage from the actual activity code to Productive or Non-Productive. I thought that this would be the best way to accomplish the goal as we have several available reason codes that employees can use.

    What we would like to see is a macro/formula that can be manually ran and will output something in the format of:
    Bunny, Bugs Productive - h:mm:ss
    Bunny, Bugs Non-Productive - h:mm:ss
    Either on the same worksheet or on a new tab would be fine as we're just using that data in a pivot table for a different workbook.
    The actual report that we export has some 1-250 employees and their activities listed. I just attached a simple example, but can upload a more detailed report if necessary.

    Any help is much appreciated. Thank you!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,650

    Re: Better Output Method Help

    If I understand correctly then I would think that a pivot table would be the easiest way to do what you want. First thing would be to remove the merge and center formatting from column A of the formatted reason sheet. Next fill in the resulting blank spaces, the linked web site has a short video that shows a simple way to do that quickly (fewer than 6 key strokes and a right mouse drag).
    After that it is just a matter of making the pivot table and using the tabular form of the report layout, adjusting the field settings > layout and print > Repeat item labels (Agent Names), filter the reason code to remove blanks, change count of duration to sum, and format the sum of duration to the fourth option under time (h:mm:ss;@)
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,926

    Re: Better Output Method Help

    You have to love how IT tries to help you out by providing data in human-readable form that is totally useless for data analysis. This is obviously either (A) a copy of the real pivot table or (B) the output of an Business Intelligence program.

    I don't know how much "pull" you have with your IT department, but if you can convince them to provide the data in the format suggested by JeteMc, you'll be well ahead of the game. What you are asking for is Row Headers Repeat whether it's a pivot table or BI output, the terminology is the same.

    The steps suggested by JeteMc can be automated by VBA if this is a recurring report. What this will do is convert the data to a normalized form that a pivot table could slice and dice anyway you want. The sad part is that the normalized data probably exists in some data table in exactly the format you need it.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  4. #4
    Registered User
    Join Date
    08-16-2016
    Location
    Illinois, USA
    MS-Off Ver
    Office 365
    Posts
    49

    Re: Better Output Method Help

    This works perfectly for this report. Thanks for getting back to me so quickly and providing the example. I'm marking this as closed now. +rep

  5. #5
    Registered User
    Join Date
    08-16-2016
    Location
    Illinois, USA
    MS-Off Ver
    Office 365
    Posts
    49

    Re: Better Output Method Help

    Quote Originally Posted by dflak View Post
    You have to love how IT tries to help you out by providing data in human-readable form that is totally useless for data analysis. This is obviously either (A) a copy of the real pivot table or (B) the output of an Business Intelligence program.

    I don't know how much "pull" you have with your IT department, but if you can convince them to provide the data in the format suggested by JeteMc, you'll be well ahead of the game. What you are asking for is Row Headers Repeat whether it's a pivot table or BI output, the terminology is the same.

    The steps suggested by JeteMc can be automated by VBA if this is a recurring report. What this will do is convert the data to a normalized form that a pivot table could slice and dice anyway you want. The sad part is that the normalized data probably exists in some data table in exactly the format you need it.
    You're absolutely right! It is an output of a BI program, and if IT wanted they could probably provide me a more usable form of this data. Sadly, I don't foresee that happening anytime soon, so thank goodness for excelforum lol.

    Thanks again for your help everyone!

  6. #6
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,926

    Re: Better Output Method Help

    I've worked with a BI Program to go from the format you are getting to one you are needing is a matter of clicking a couple of buttons. It's not a major coding development. In fact there's no "real" coding at all. The main issue would be political: will other users for the same report go along with the new format?

    Are you interested in a VB solution that emulates JeteMc's suggestion?

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,650

    Re: Better Output Method Help

    You're Welcome. Thank You for the feedback and marking the thread as 'Solved'. I hope that you have a blessed day.

+ 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. Compare values and output cell titles, able to output multiple results
    By TMG2016 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 05-07-2016, 11:42 AM
  2. [SOLVED] Array to embed formula and if number of output is met output Blank
    By ywang in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-29-2015, 02:34 AM
  3. [SOLVED] Cell reference, output dates to numeric. Should output as text
    By lifeseeker1019 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-02-2015, 05:51 PM
  4. [SOLVED] Comparing two cells for similarities and output a third cell (if C1 = B1, then output A1)
    By PERFECT777 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-26-2013, 12:37 AM
  5. [SOLVED] Paste variable output (SQL Output) into a single cell.
    By fblaze in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-28-2013, 06:24 AM
  6. Looping through columns to copy output into other sheet, and saving output
    By eludlow in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-08-2009, 06:27 AM
  7. Importing several Output sheets into one consolidated Output Sheet
    By Ugh_Der in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-13-2009, 08:58 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