+ Reply to Thread
Results 1 to 15 of 15

Need help separating and transposing this data please!

  1. #1
    Registered User
    Join Date
    04-30-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2011
    Posts
    6

    Wink Need help separating and transposing this data please!

    Hello,

    I have over 8,000 of these continuous information. Looking at the screenshot you will see the 'Day' column. 1 is Monday, 2 is Tuesday, 3 is Wednesday, and so on. I need to get the times to transpose into one row for each store ID. Instead of having seven store ID's, I need one store ID per a row. There would be 14 Columns total per a Store ID because there are seven days and Open and Close for each day. Is there a way to quickly do this?

    Thank you so much!
    Attached Images Attached Images

  2. #2
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: Need help separating and transposing this data please!

    A pivot table works great for this purpose.
    Attached Files Attached Files
    Please click the * icon below if I have helped.

  3. #3
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Need help separating and transposing this data please!

    What you gonna do with the transposted data?

    You get better help if you post an excel example, without confidentional information.

    It also helps if you add the desired (expected) data in the same sheet.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Need help separating and transposing this data please!

    Like so, list the storeIDs in column G, then the one formula is in H3, copy that down and across as far as needed.
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  5. #5
    Registered User
    Join Date
    04-30-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2011
    Posts
    6

    Re: Need help separating and transposing this data please!

    It's not confidential, it's public info. Just to be safe though I replaced the info so nothing to be worried about. I like the pivot table idea, but wasn't able to get mine like yours. I tried replicating it down to the format of H:MM AM/PM but I just have the average of open and closed leading to all the data to be #DIC/0!

  6. #6
    Registered User
    Join Date
    04-30-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2011
    Posts
    6

    Re: Need help separating and transposing this data please!

    Ok I just copied JBeaucaire's formula, but I wanted to teach myself on perfecting the pivot table and that formula. I guess I can do it some other time. Thanks JBeaucaire and Melvinobb!

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Need help separating and transposing this data please!

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

  8. #8
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: Need help separating and transposing this data please!

    Right Click the Pivot Table - Select "PivotTable Options" - under "Format" set "for error values show:" to Closed.

  9. #9
    Registered User
    Join Date
    04-30-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2011
    Posts
    6

    Re: Need help separating and transposing this data please!

    Hey Jbeaucaire,

    I can't close it yet because I did your formula and it looked great, but as I went down the list I noticed that it stopped working and put a false and identical time for the rest of the rows. I can't figure out why. When I redo it, the row number where it stops working changes. It's very odd. Any ideas?

    Thank you!

  10. #10
    Registered User
    Join Date
    04-30-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2011
    Posts
    6

    Re: Need help separating and transposing this data please!

    Quote Originally Posted by JBeaucaire View Post
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.
    Thanks.
    can you see the above post please?

  11. #11
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: Need help separating and transposing this data please!

    djung - When oeldere posted, he was recommending you post a sample excel workbook, rather than an image file. It probably would be beneficial here.
    It is very difficult to tell why the formula is not working without seeing your workbook.

    I can only guess that you need to change the range in the formula provided:
    =INDEX($C$2:$D$22, MATCH($G3&"-"&H$1, INDEX($A$2:$A$22&"-"&$B$2:$B$22, 0), 0), MATCH(H$2, $C$1:$D$1, 0))

    The formula works if your data is in rows 2-22. change the "22" to the row your data ends in.

  12. #12
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Need help separating and transposing this data please!

    I'd love to see these "false times". The formula is using Exact-matching so it should give errors when a match isn't found, not a false match.

    Looking forward to see your implementation of my solution. Perhaps you should just drop all your data into my workbook?

  13. #13
    Registered User
    Join Date
    04-30-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2011
    Posts
    6

    Re: Need help separating and transposing this data please!

    Quote Originally Posted by JBeaucaire View Post
    I'd love to see these "false times". The formula is using Exact-matching so it should give errors when a match isn't found, not a false match.

    Looking forward to see your implementation of my solution. Perhaps you should just drop all your data into my workbook?
    I wasn't able to upload it. May be too big. I had to cut out the complete formula input and also had to cut out almost half of the data.

    Thanks
    Attached Files Attached Files

  14. #14
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: Need help separating and transposing this data please!

    Uploading a sample workbook helped clarify why the pivot table option was not working for you.
    The reason the pivot table wasn't working is because your Open and Close times are not recognized as times.
    To accomplish this, put this formula in columns E & F:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    You can then make your pivot table based on those columns.
    Attached Files Attached Files

  15. #15
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Need help separating and transposing this data please!

    My formula approach would work if you adjusted the range of the references from 21 rows to however many rows you have in your data. But it will kill your computer in calculations. I wouldn't recommend it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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