+ Reply to Thread
Results 1 to 6 of 6

Macro for data transformation

  1. #1
    Registered User
    Join Date
    01-04-2012
    Location
    India
    MS-Off Ver
    Excel 2019
    Posts
    24

    Macro for data transformation

    Hi,

    I have a data in excel which need to be transformed/structured so that it can be pivoted to get desired results. The first four columns of the file will give product information and the next columns gives the product ID, store name and price information. For each of the store name associated to the product, a different column is created along with their price value. The first four columns should get repeated the number of times the store names are there (in the columns) in the data. The data should get appended top to bottom with their specific store name, product ID and price.

    Attaching sample data and desired view.

    Any help here will be appreciated.

    Thanks,
    Sasikiran
    Attached Files Attached Files

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Macro for data transformation

    Is your profile up to date - are you still using Excel 2007?
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Registered User
    Join Date
    01-04-2012
    Location
    India
    MS-Off Ver
    Excel 2019
    Posts
    24

    Re: Macro for data transformation

    My bad! I just updated my profile. I am using the latest version of excel.
    Last edited by narikisas; 11-11-2019 at 08:11 AM.

  4. #4
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Macro for data transformation

    You could use Power Query (Get & Transform Data):

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-04-2012
    Location
    India
    MS-Off Ver
    Excel 2019
    Posts
    24

    Re: Macro for data transformation

    Thanks a ton! It really helped - Resolved
    Last edited by narikisas; 11-12-2019 at 05:16 AM. Reason: Resolved

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,882

    Re: Macro for data transformation

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

    Also, as a relatively new member of the forum, 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 those who helped.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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. Data transformation with example
    By apjenkins in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-02-2016, 11:53 PM
  2. [SOLVED] Transformation of data with macro
    By eppe89 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-26-2016, 03:12 PM
  3. Need Macro to compare source and target transformation logic
    By aniletc37 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-06-2014, 03:29 AM
  4. Array transformation and sinusoidal distribution of data macro
    By Vilim4 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-23-2013, 12:29 PM
  5. Data transformation
    By jaZZerkill in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-28-2012, 06:56 AM
  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