+ Reply to Thread
Results 1 to 3 of 3

Transposing grouped data (large dataset)

  1. #1
    Registered User
    Join Date
    02-17-2018
    Location
    Finland
    MS-Off Ver
    2016
    Posts
    2

    Transposing grouped data (large dataset)

    Hello!

    I have several thousands of financial statements from different companies that I am going to analyze. My problem is that the financial statements are listed beneath each other on the same worksheet in Excel. Each company has financial information from five different financial years in columns B-F and each company’s’ financial statement is 151 rows long.

    I am now trying to transpose each company’s financial statement into a format that will make it easier to analyze and calculate new variables and delete unnecessary information . I cannot simply select all information and copy and transpose, because then I will get as many columns as there are rows.

    I tried simplifying how my data looks and how I am trying to structure it in the picture below. I also made a sample workbook with five companies financial statements. The sheet “Financial Statements” shows how my data will look and the sheet “Transposed data” shows how I am trying to structure it.

    Is there any way to transpose data like this? I tried looking at the Power Query tool but didn’t find any solution. My sample will likely consist of about 25 000 different companies so doing it manually would take quite some time. I don’t have that much experience with macros and VBA-programming.

    Help greatly appreciated, Bengan1.


    https://www.excelforum.com/attachment.php?attachmentid=561932&stc=1&d=1519064365

    https://www.excelforum.com/attachment.php?attachmentid=561931&stc=1&d=1519064365
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Transposing grouped data (large dataset)

    Hi Bengan,

    It looks like a Power Query routine would help with this problem. I saved your workbook and pulled Sheet1 into Power Query (it is called Get & Transform in 2016 Excel). Then I added a conditional column and pulled out the "Company Number" into a column of its own. Then did a Fill Down to repeat which company... Changed the Year to a date and values to currency. Then I UNPIVOTed using PQ the other columns. After pulling it back into Excel a Pivot Table seemed to be what you wanted, so I put it on your second sheet. See if this works for you. There is a lot of learning to get to my answer but I think this is what you want. You can open the attached and see the PQ steps and look at the Pivot. Hope this helps.

    PQ for Bengan Answer.xlsx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    02-17-2018
    Location
    Finland
    MS-Off Ver
    2016
    Posts
    2

    Re: Transposing grouped data (large dataset)

    Thank you for taking you time MarvinP. I will look into your process and try to implement it.

+ 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. Replies: 3
    Last Post: 10-20-2017, 12:40 AM
  2. Best method of extracting data from large dataset
    By Manchesterpolstudent in forum Excel General
    Replies: 2
    Last Post: 08-07-2017, 03:01 PM
  3. [SOLVED] Transposing monthly grouped data from multiple rows to columns
    By taskkill in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-21-2016, 11:14 AM
  4. Replies: 3
    Last Post: 01-23-2014, 10:13 AM
  5. Averaging Discrete Sets of Data in a Large Dataset
    By wrf_89 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-26-2013, 03:27 PM
  6. [SOLVED] Grouped data transposing
    By Nairobi Nice in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-12-2012, 06:14 AM
  7. Transposing Data...again In another Dataset
    By strickrn in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-19-2009, 10:44 PM

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