+ Reply to Thread
Results 1 to 12 of 12

How to tranpose data and possibly concatenate custom format.

  1. #1
    Forum Contributor
    Join Date
    12-25-2020
    Location
    United States
    MS-Off Ver
    Office 365
    Posts
    505

    How to tranpose data and possibly concatenate custom format.

    Hi there,

    I have a data set, consider it to be the first table on the far left. A helper column was inserted because I could not think of any other work around. I am trying to take that data and transform it into another table, that I have partially constructed in table 3 (the far right).

    My goal is to have:

    1) Each location, summed, counted, and duration broken down as shown for example (0h01 - 2), if there is more than one value.

    2) However, also, I would like to not have repeated values (as you may see 0h01 is shown twice).

    3) Lastly, I would like a formula in cell A12 that yields the result in M7.

    The middle table is what I was "playing" around with.

    If you have any insight, is this possible to accomplish? Appreciate your time in viewing.
    Attached Files Attached Files

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: How to tranpose data and possibly concatenate custom format.

    Try at N2

    =LET(ts,SORT(FILTER($C$2:$C$11,$A$2:$A$11=$L2)),t,INDEX(UNIQUE(ts),COLUMNS($N2:N2)),IFERROR(TEXT(t,"h\hmm - ")&SUM(--(ts=t)),""))
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    12-25-2020
    Location
    United States
    MS-Off Ver
    Office 365
    Posts
    505

    Re: How to tranpose data and possibly concatenate custom format.

    Thank you. The format looks good, it would be "2" though for counting.

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

    Re: How to tranpose data and possibly concatenate custom format.

    For another possibility, you could get similar information from a pivot table by:
    1. Placing Location in the Rows area
    2. Placing Duration in the Columns area
    3. Placing Duration (Sum) in the Values area (formatted h"h"mm)
    4. Placing Location (Count) in the Values area
    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.

  5. #5
    Forum Contributor
    Join Date
    12-25-2020
    Location
    United States
    MS-Off Ver
    Office 365
    Posts
    505

    Re: How to tranpose data and possibly concatenate custom format.

    Just tried this. How do you display the other values to represent the breakdown for NY (0h01 - 2, 0h15 - 1)?

  6. #6
    Forum Contributor
    Join Date
    12-25-2020
    Location
    United States
    MS-Off Ver
    Office 365
    Posts
    505

    Re: How to tranpose data and possibly concatenate custom format.

    I added duration to rows on top of it, which broke it down, but then its vertical and it won't let me format it as h"h"mm.

  7. #7
    Forum Contributor
    Join Date
    12-25-2020
    Location
    United States
    MS-Off Ver
    Office 365
    Posts
    505

    Re: How to tranpose data and possibly concatenate custom format.

    I'd like to apologize. I never dragged the formula over, Bo_Ry that was all correct. JeteMC, similarly will show in a new thread, there is a similar issue in the pivot table regarding post #6. Thank you both I do appreciate it.

  8. #8
    Forum Contributor
    Join Date
    12-25-2020
    Location
    United States
    MS-Off Ver
    Office 365
    Posts
    505

    Re: How to tranpose data and possibly concatenate custom format.

    My apologies again, I just caught this. Highlighted in yellow, you see how the amount repeats, would this be a trailing space issue in the locations?
    Attached Images Attached Images

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

    Re: How to tranpose data and possibly concatenate custom format.

    It would be easier to troubleshoot the issue if we could see the Excel File, even with location anonymized (i.e., location1, location2 etc.)

  10. #10
    Forum Contributor
    Join Date
    12-25-2020
    Location
    United States
    MS-Off Ver
    Office 365
    Posts
    505

    Re: How to tranpose data and possibly concatenate custom format.

    How's this?
    Attached Files Attached Files

  11. #11
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: How to tranpose data and possibly concatenate custom format.

    Try

    G2
    =LET(ts,SORT(MROUND(FILTER($B$2:$B$1159,$A$2:$A$1159=$E2),"0:1")),t,INDEX(UNIQUE(ts),COLUMNS($G2:G2)),IFERROR(TEXT(t,"h\hmm - ")&SUM(--(ts=t)),""))
    Attached Files Attached Files

  12. #12
    Forum Contributor
    Join Date
    12-25-2020
    Location
    United States
    MS-Off Ver
    Office 365
    Posts
    505

    Re: How to tranpose data and possibly concatenate custom format.

    Thank you very much. Is there a way to filter or sort these locations without affecting the formulas, or is better to copy and repaste as values in a new sheet, retable than sort?

+ 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. [SOLVED] Concatenate a date and custom format of a number
    By Elainefish in forum Excel General
    Replies: 8
    Last Post: 12-11-2018, 04:36 AM
  2. Custom Format single element of a concatenate
    By _MANNY_ in forum Excel General
    Replies: 3
    Last Post: 12-22-2017, 10:09 PM
  3. [SOLVED] Concatenate not including all Zeros in 4digit custom format
    By DoraExplorExcel in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-17-2017, 01:32 PM
  4. [SOLVED] Tranpose data
    By durga_ikon in forum Excel General
    Replies: 10
    Last Post: 05-08-2012, 01:54 AM
  5. Tranpose data
    By mitulthakker in forum Excel General
    Replies: 8
    Last Post: 04-26-2012, 11:29 AM
  6. Tranpose data Problem
    By excelhelp18 in forum Excel General
    Replies: 4
    Last Post: 03-02-2012, 07:52 AM
  7. [SOLVED] Macor for Tranpose data
    By Elainey in forum Excel General
    Replies: 2
    Last Post: 01-04-2006, 04:25 PM

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