+ Reply to Thread
Results 1 to 6 of 6

VBA Transpsoe data

  1. #1
    Registered User
    Join Date
    10-12-2020
    Location
    Singapore
    MS-Off Ver
    365 ProPlus
    Posts
    3

    Question VBA Transpsoe data

    Hi, I am new to VBA, and for my work I am suppose to clean my data to be in Power BI format.
    As shown in the workbook, the raw data is above and the final cleaned(transposed) data is below. I want to create a macro so that the raw data can be transposed into the clean data. In raw data the date is odd, only shows the day of the month(can be seen in the workbook, so would need a macro to correct the date. Also in the clean data there is an added column for location, this data for location is fixed for this excel, i have other excel with the same format of raw data but they are for different location, so would need a macro to add the location column and key in the location name for that excel, so in power bi, can combine all excel files and their data can be differentiated by location even though they have same properties. This raw data cannot use direct transposing if you see the raw data I am handling and my desired clean data, that is why it requires VBA. The sample workbook attached is a simplified version of the actual one I'm working on, where there are more 50+ properties and dates reaching August 2020. So the VBA probably will require a loop. Would be so grateful to if anyone can create a macro to turn the raw data into the clean data. I tried doing myself but so far I haven't found an online video/tutorial on how to transpose data for my case.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: VBA Transpsoe data

    Try
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    10-12-2020
    Location
    Singapore
    MS-Off Ver
    365 ProPlus
    Posts
    3

    Re: VBA Transpsoe data

    Hi thank you for the quick response, this VBA works for this raw data provided in the sample workbook, but the actual data I'm handling have 50+ properties(meaning 50+rows) and hundreds of columns(because there are even more dates, and ever month new data is uploaded). hence is there a configuration to this current VBA to have a loop?

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: VBA Transpsoe data

    No idea about what you have...

  5. #5
    Registered User
    Join Date
    10-12-2020
    Location
    Singapore
    MS-Off Ver
    365 ProPlus
    Posts
    3

    Re: VBA Transpsoe data

    As in the sample workbook attached shows only 4 rows of data and 10 columns for dates for simplicity, but actual workbook(confidential) raw data that I am working on has 49 Different properties and like hundreds of dates.(starting from the date shown in the workbook)

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: VBA Transpsoe data

    I said already, no idea about what you have.

    So no idea about the result that you want.

+ 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. Replies: 5
    Last Post: 10-03-2019, 07:23 PM
  2. [SOLVED] Read ( FRONT ) page data then transfer that data to the main data Sheet (OPEN)
    By Potholes in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 08-22-2019, 01:35 AM
  3. Replies: 2
    Last Post: 04-30-2017, 08:28 PM
  4. Replies: 11
    Last Post: 12-23-2014, 01:01 PM
  5. Replies: 34
    Last Post: 01-21-2014, 03:07 PM
  6. Replies: 4
    Last Post: 02-01-2013, 10:18 AM
  7. Replies: 2
    Last Post: 07-18-2012, 09:11 AM

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