+ Reply to Thread
Results 1 to 9 of 9

Need to get reports from badly formatted exported data

  1. #1
    Registered User
    Join Date
    09-21-2020
    Location
    England
    MS-Off Ver
    O365
    Posts
    14

    Need to get reports from badly formatted exported data

    Hi everyone second post, so hope I get this right!

    Attached is an example of the excel sheet a system gives when you select 'export to excel'. It (badly!) shows the employee name, leave type, leave dates and durations.

    What I need to be able to do is either create a tab that has formulas to pull the key info, or a pivot table. I have posted here rather than the pivot forum as the current format won't allow a pivot to be created (so guessed I would need to reformat with formulas before I can create a pivot).

    The information I need to summarise from this data is:
    - How many days leave in a set time period for each leave type (there are 15 types in total and days are listed in col C)?
    - Based on the above, which employees had that type of leave?

    Examples of queries I need to answer based on the summarised data:
    - How many people were sick in September?
    - How long was the average person sick in September?
    - How many days were taken as holiday in September?
    - Who was on mat leave in September?


    I really hope I have explained clearly, thank you in advance.
    Attached Files Attached Files
    Last edited by TryingToLearnUK; 10-06-2020 at 03:20 PM. Reason: Solved

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,943

    Re: Need to get reports from badly formatted exported data

    You can normalize your data set into a usable table by using columns of formulas to extract the information into one row for each of the 5 row blocks that you have. In the attached, I used formula in H4:M4, and I copied the yellow cells (5 rows by 6 columns) into the green cells (20 rows by 6 columns). The usefulness of this technique can be extended to blocks of data that vary in row size; that requires using a lot of ifs and having formulas in every row instead of just one out of five.

    Then you can use a pivot table or other summary on those 6 columns.
    Attached Files Attached Files
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    09-21-2020
    Location
    England
    MS-Off Ver
    O365
    Posts
    14

    Re: Need to get reports from badly formatted exported data

    Hi Bernie, thank you so much for responding. This approach works great, until I found there were some individuals with several leave instances, or where the exported data spits out a new location name so the order goes awry.

    I have attached a doc with 2 new tabs, 1 shows the instance where the 2+ leave occurrences mean your approach won't work, and 1 shows another way we can get the data (it exports to Word and this is a copy into excel, the actual export is 4k lines and has graphs (as I CTRL+A Word)).

    I think it will need some kind of index formula? I managed a summary table to count the leave types (col A), but could not work out how to make it return all the other elements I need

    Thank you!
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,943

    Re: Need to get reports from badly formatted exported data

    Here is a file with the conditional formulas that fill the entire table....
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    09-21-2020
    Location
    England
    MS-Off Ver
    O365
    Posts
    14

    Re: Need to get reports from badly formatted exported data

    Once again, thank you, I truly appreciate your support here. It is almost working! I have copied the details of an employee who had several leave instances, your formula doesn't capture these?

    If it is me missing the obvious please let me know!!
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,943

    Re: Need to get reports from badly formatted exported data

    I think this will work.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    09-21-2020
    Location
    England
    MS-Off Ver
    O365
    Posts
    14

    Re: Need to get reports from badly formatted exported data

    Wahoo I think we are there It carries on the last name forever but that isn't the end of the world! The only thing I am struggling with now, is working out how many days are in September. Can't get the period of time cut in the pivot, so looking to add a column in the data tab for number of days the period falls into each month - does that make sense?

  8. #8
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,943

    Re: Need to get reports from badly formatted exported data

    Sure - the formulas should be easy - take a look at the EOMONTH function - or use DATE(YEAR(cell),MONTH(cell),0) to return the last day of the previous month or DATE(YEAR(cell),MONTH(cell)+1,0) to return the last day of the month, for splitting purposes. You may need to use WORKDAY as well, with a list of holidays.....

    Start a new thread if you have any date math questions...

  9. #9
    Registered User
    Join Date
    09-21-2020
    Location
    England
    MS-Off Ver
    O365
    Posts
    14

    Re: Need to get reports from badly formatted exported data

    You are brilliant - thank you so so much!! I will close the thread as all resolved

+ 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. Lookup from badly formatted spreadsheet
    By onkelchris in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-06-2017, 01:33 PM
  2. Badly sorted data exported from access
    By Josephwat13 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-29-2015, 07:35 AM
  3. [SOLVED] I badly need help please: Get data across multiple sheet
    By lati2008 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-23-2014, 07:03 PM
  4. Need help breaking a report into mulitple sorted/formatted reports
    By tenscourts in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-19-2012, 03:44 PM
  5. Conditional concatenation problem for badly organised data
    By XL4NEthing in forum Excel General
    Replies: 2
    Last Post: 02-02-2012, 12:25 PM
  6. Replies: 2
    Last Post: 09-27-2011, 06:09 PM
  7. Replies: 0
    Last Post: 05-20-2009, 05:37 AM

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