+ Reply to Thread
Results 1 to 6 of 6

Date/Data Transformation

  1. #1
    Registered User
    Join Date
    09-19-2014
    Location
    Sarasota, Florida
    MS-Off Ver
    Enterprise, so new?
    Posts
    11

    Date/Data Transformation

    I do not know what this process would be called besides a pain.

    I have a list of vehicles with data added by date in a horizontal manner:

    ID Asset# 1-Jan-21 2-Jan-21 3-Jan-21
    132 082-S132 195771 195771 195771
    133 082-S133 188072 188072 188072
    145 082-S145 179694 179694 179910

    I need to convert this to a vertical format:

    1-Jan-21 132 082-S132 195771
    1-Jan-21 133 082-S133 188072
    1-Jan-21 145 082-S145 179694
    2-Jan-21 132 082-S132 195771
    2-Jan-21 133 082-S133 188072
    2-Jan-21 145 082-S145 179694
    3-Jan-21 132 082-S132 195771
    3-Jan-21 133 082-S133 188072
    3-Jan-21 145 082-S145 179910

    Outside of cut and paste - what tool in excel could help me automate or reduce effort. In scale - there are 5 years worth of mileage data, by day, for 150 vehicles in total. That's a lot of cut and paste.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,826

    Re: Date/Data Transformation

    It looks like a basic "unpivot" operation. If you have access to a newer version of Excel (your profile is saying 2007), you can use Power Query/Get and Transform to quickly unpivot data. Or there are a couple of other strategies in this thread: https://www.excelforum.com/excel-gen...es-please.html
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,177

    Re: Date/Data Transformation

    if you have Microsoft Access, you can run N queries to transpose it.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Date/Data Transformation

    If PowerQuery was available to you this could be done in a single step, all you would need to do is unpivot all the date columns.

    However, since you don't appear to have that you could use this code.

    Please note, the result won't be sorted with the same order as the result you show in the uploaded workbook but you could easily fix that by sorting manually or adding code to do the sorting.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  5. #5
    Registered User
    Join Date
    09-19-2014
    Location
    Sarasota, Florida
    MS-Off Ver
    Enterprise, so new?
    Posts
    11

    Re: Date/Data Transformation

    So, my apologies. I never even thought to look at the profile - it was a little outdated....

    Thank you on the Power Query-unpivot info. I am going to youtube post haste to learn how to do it.

  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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Date/Data Transformation

    Enterprise, so new?
    Well, you tell us!!!

    If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your version is for Mac, please also state this. Thanks.
    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.

+ 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] Power Query transformation of unrecognizable date/time format in column with various input
    By Marbleking in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-20-2021, 02:15 PM
  2. Data Transformation
    By dupao in forum Excel General
    Replies: 5
    Last Post: 10-29-2020, 10:52 AM
  3. [SOLVED] Power Query Date Transformation
    By Moggzzz in forum Excel General
    Replies: 2
    Last Post: 03-21-2018, 02:47 PM
  4. Data transformation with example
    By apjenkins in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-02-2016, 11:53 PM
  5. Creating a year to date transformation
    By JPSIMMON in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-04-2014, 02:41 PM
  6. transformation of data?
    By schallpattern in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-02-2008, 10:16 PM
  7. Data Transformation
    By zaisaki in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-30-2005, 12:05 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