+ Reply to Thread
Results 1 to 13 of 13

Transposing problem

  1. #1
    Registered User
    Join Date
    04-12-2018
    Location
    Rotterdam
    MS-Off Ver
    Office 365
    Posts
    4

    Transposing problem

    Hello everybody,
    I have a dataset of more than 2000 mutual funds, for these funds I have data over time for different characteristics like return and certain industry weights in their portfolio.

    The problem here is, is that per mutual fund I have one row containing all the data. The data for the particular characteristic per time period is divided per column. And the dates of the different characteristics is only in the column header, so not in a seperate cell or anything. To be able to analyse the data I need it in a panel data format where every mutual fund has got the seperate time periods with all the data standing besides it, and that for every fund in my sample.

    I do not think I can use the transpose function because of the sheer number of characteristics that need transposing. Do you have any suggestions to solve this problem?

    Thanks in advance!

    If you need an example I will post an attachment.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Transposing problem

    Yes, please attach a sample Excel workbook.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    04-12-2018
    Location
    Rotterdam
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Transposing problem

    Hello everybody,
    I have a dataset of more than 2000 mutual funds, for these funds I have data over time for different characteristics like return and certain industry weights in their portfolio.

    The problem here is, is that per mutual fund I have one row containing all the data. The data for the particular characteristic per time period is divided per column. And the dates of the different characteristics is only in the column header, so not in a seperate cell or anything. To be able to analyse the data I need it in a panel data format where every mutual fund has got the seperate time periods with all the data standing besides it, and that for every fund in my sample.

    I do not think I can use the transpose function because of the sheer number of characteristics that need transposing. Do you have any suggestions to solve this problem?

    Thanks in advance!
    In the attachment you can find an example of how it is now: all data in one row.
    And how I want it to be --> below the previous example.
    Attached Files Attached Files

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Transposing problem

    Would you manually add the exact results you expect to see given your example row. And please add several example rows covering all permutations of entries. I'm assuming you have at least one row per name.

    In addition might you have several rows for the same name?
    In the Month/Year column do you literally want a text string like January 2012? Personally iI'd use a proper date like say 1/1/2012 since that makes analysis, particularly with a pivot table much easier.

    It's also not clear what you expect in the Returns and industry weights column. Please explain where these come from in the original data
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  5. #5
    Registered User
    Join Date
    04-12-2018
    Location
    Rotterdam
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Transposing problem

    I have now altered my example that you can see better what I mean to do.
    I know the returns mentioned are just three months, and the cells I refer to have more months but I want to get to know what formula I can use to transpose different cells to different columns in the same time period.

    Thanks in advance!
    Attached Files Attached Files

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Transposing problem

    Your solution example has nothing to do with the data source

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Transposing problem

    Yes, it does, Sandy. It's just a very poor layout.

  8. #8
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Transposing problem

    It's more likely that you'll need a macro to do this. But I still need to understand your data.
    You've only shown one example Data Row 2. We really need to see a few more.

    In addition we need to understand where the numbers in the Return column come from or how they are calculated with referenece back presumably to one of the columns in the data row.

    You haven't said but I assume the Name you want in the results table is the name from column A of the data. It would also help if the results actually reflected the data. You have a single data row for February 2018 but your results able only mentions February 2012.

    You need to be very specific and clear with your data and results if we are to understand precisely what you want so please include several data rows and ALL the results that flow from them. Neither do you show what you expect in the Concentration Results column.

    You need to help us to help you. Rememember your data is meat and drink to you and you understand exactly what it is, and in your mind you know what you want. We are starting from scratch and have no real idea.

  9. #9
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Transposing problem

    @post #7
    This is your opinion. My is different

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Transposing problem

    You are entitled to your opinion, Sandy. However:

    Excel 2016 (Windows) 32 bit
    A
    B
    C
    D
    E
    12
    Desired solution
    13
    Name Month/year Returns Concentration
    14
    Fund 1
    01-Jan
    0.61
    =BJP2
    15
    Feb-12
    -0.28
    =BJQ2
    16
    01/03/2012
    4.08
    =BJR2
    17
    fund2
    01-Jan
    18
    Feb-12
    19
    01/03/2012
    Sheet: Sheet1


  11. #11
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Transposing problem

    @AliGW No prob... If you say so resolve it

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Transposing problem

    @ Hoekstraat - continue in this thread. Do not open duplicates.

    As Richard has suggested, we do need more sample data. I can see where your results have come from, as you have used a direct cell reference to show us. However, what makes this difficult to solve is the column headers. It would be easier if there were two more header rows, one for the fund nuymber and another for the date.

    As I have already mentioned in my earlier response to Sandy, your data layout is poor: changing it to a normalised layout (one record per data item instead of multiple columns) would make everything much easier.
    Last edited by AliGW; 04-12-2018 at 07:19 AM.

  13. #13
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Transposing problem

    is this similar to what you want to achieve?
    (errors was changed to 0)

    example is taken from your duplicated thread
    Attached Files Attached Files
    Last edited by sandy666; 04-12-2018 at 08:25 AM.

+ 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. Problem Transposing between workbooks
    By coreytroy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-30-2014, 05:00 PM
  2. Problem Transposing a column of Data
    By Impartial Derivative in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-07-2011, 01:35 PM
  3. Transposing Problem
    By ramssmar in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 11-27-2009, 04:44 PM
  4. Problem in Transposing
    By batrasunil81 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-29-2008, 04:07 AM
  5. transposing problem
    By karelappel in forum Excel General
    Replies: 2
    Last Post: 01-21-2008, 02:34 PM
  6. [SOLVED] Please help with a column/row transposing problem
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-26-2006, 05:40 AM
  7. Replies: 2
    Last Post: 07-25-2006, 07:30 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