+ Reply to Thread
Results 1 to 13 of 13

Transpose yearly and monthly data

  1. #1
    Registered User
    Join Date
    02-26-2022
    Location
    India
    MS-Off Ver
    365
    Posts
    5

    Transpose yearly and monthly data

    I have monthly temp data. I want to plot it by monthly for each year. I have attached sampled csv file. Can you help?

    Thanks.

    see file : sample_temp_monthly.csv
    Attached Files Attached Files

  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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,470

    Re: Transpose yearly and monthly data

    Welcome to the forum.

    First, clear ALL data from column K oonwards.

    Then, in K2:

    =UNIQUE(F2:F26)

    In L2:

    =TRANSPOSE(UNIQUE(G3:G26))

    In L3 copied down:

    =TRANSPOSE(FILTER(H$3:H$26,(F$3:F$26=$K3),""))
    Attached Files Attached Files
    Last edited by AliGW; 02-26-2022 at 03:20 AM. Reason: Workbook amended.
    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
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,470

    Re: Transpose yearly and monthly data

    Alternatively (also in the attached workbook), in Y2:

    Year

    In Y3:

    =UNIQUE(--LEFT(A4:A1803,4))

    In Z2:

    =TRANSPOSE(UNIQUE(--MID(A4:A1803,6,2)))

    In Z3 copied down:

    =TRANSPOSE(FILTER(B$4:B$1803,(--LEFT(A$4:A$1803,4)=$Y3),""))

    AliGW on MS365 Insider (Windows) 64 bit

    Y
    Z
    AA
    AB
    AC
    AD
    AE
    2
    Year
    1
    2
    3
    4
    5
    6
    3
    1950
    -3.97088
    -1.08387
    2.395987
    7.754243
    10.45857
    16.31512
    4
    1951
    -3.26019
    -0.66962
    1.486795
    5.467989
    10.93503
    15.0262
    5
    1952
    -4.32564
    -0.44316
    4.329255
    7.133764
    12.10834
    17.06618
    6
    1953
    -3.1646
    -0.75623
    2.12897
    8.089749
    11.11607
    18.33482
    7
    1954
    -3.20357
    0.378325
    0.369382
    4.433573
    11.11754
    16.75439
    8
    1955
    -4.54524
    -4.14993
    -0.60776
    6.343187
    11.74301
    15.51771
    9
    1956
    -5.51674
    -1.28329
    3.637789
    9.392274
    13.00579
    19.12136
    10
    1957
    -4.61113
    -5.61714
    2.178316
    6.621301
    11.87935
    16.52139
    11
    1958
    -6.3783
    -3.79945
    0.319811
    6.119252
    9.363994
    16.12909
    Sheet: sample_temp_monthly
    Last edited by AliGW; 02-26-2022 at 03:25 AM.

  4. #4
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,470

    Re: Transpose yearly and monthly data

    No response ...

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,207

    Re: Transpose yearly and monthly data

    I am determined to get to grips with dyanmic arrays... The OP may/may not have gone away happy... but I decided to fiddle with this one this morning because... well, just because...

    Finally!!

    One formula in one cell:

    =LET(a,A4:A1803,b,B4:B1803,y,LEFT(a,4),u,UNIQUE(y),rc,COUNTA(u),cc,ROWS(a)/rc,tcc,cc+1,d,INDEX(b,SEQUENCE(rc,cc)),f,CHOOSE(1+INT(SEQUENCE(,tcc)/tcc),d,u),INDEX(f,SEQUENCE(rc),tcc-MOD(tcc+1-MOD(SEQUENCE(,tcc),tcc),tcc)))
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  6. #6
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,470

    Re: Transpose yearly and monthly data

    The OP didn't have the courtesy to say whether or not (s)he was happy. Having looked at post #2, (s)he just disappeared. Not even so much as a quick, "Thanks". But don't worry, Glenn - I'm interesetd in your fromula and others will be, too.

  7. #7
    Registered User
    Join Date
    02-26-2022
    Location
    India
    MS-Off Ver
    365
    Posts
    5

    Re: Transpose yearly and monthly data

    Thank you very much.

  8. #8
    Registered User
    Join Date
    02-26-2022
    Location
    India
    MS-Off Ver
    365
    Posts
    5

    Re: Transpose yearly and monthly data

    Thanks for your help.

  9. #9
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,470

    Re: Transpose yearly and monthly data

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  10. #10
    Registered User
    Join Date
    02-26-2022
    Location
    India
    MS-Off Ver
    365
    Posts
    5

    Re: Transpose yearly and monthly data

    Thanks for your quick help.

    Further, suppose I have missing months in the data and i want to create similar transpose , how can I do it? I have attached sample csv with missing months.

    Thanks.
    Attached Files Attached Files

  11. #11
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,470

    Re: Transpose yearly and monthly data

    What have you tried?

    In F2:

    =UNIQUE(A2:A19)

    IN G1 copied across to R1:

    =COLUMNS($G1:G1)

    In G2 copied across and down:

    =SUMIFS($C$2:$C$19,$A$2:$A$19,$F2,$B$2:$B$19,G$1)
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    02-26-2022
    Location
    India
    MS-Off Ver
    365
    Posts
    5

    Re: Transpose yearly and monthly data

    Thanks. It works fine.

  13. #13
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,470

    Re: Transpose yearly and monthly data

    If you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

+ 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. Converting yearly data to monthly
    By MilicaMatovic in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-05-2016, 06:59 PM
  2. Converting weekly to monthly data and Yearly data to monthly
    By MilicaMatovic in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 01-29-2016, 09:48 AM
  3. how to best organize Daily. Monthly, and yearly data???
    By JonTaylor in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-08-2015, 01:33 AM
  4. Replies: 1
    Last Post: 03-08-2013, 04:18 PM
  5. Replies: 5
    Last Post: 03-07-2013, 11:38 AM
  6. Converting a daily data to a monthly or yearly one
    By rimajed in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 05-25-2012, 03:14 AM
  7. Converting monthly data into yearly averages
    By alcleland in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-14-2008, 08:34 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