+ Reply to Thread
Results 1 to 5 of 5

MACRO to transform single column to multiple columns, based in dynamic values

  1. #1
    Registered User
    Join Date
    08-07-2012
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    3

    MACRO to transform single column to multiple columns, based in dynamic values

    Hello guys, I am new to the forum and I am very impressive with the level of the users around here. Congrats to you all.

    I have a excel file with a macro that transform a report from other software into a “understandable” database to create pivot tables.

    I think I have done 85% of the job with the macro called “flash”, however there are few procedures that I am doing manually, because I don’t know how to do it throughout formulas or macros.

    Please, check the attached file to understand where I am and where I would like to be.

    One important thing. The number and the content of the rows are dymanic. About the columns: the columns that represents the "days" are dymanic. The type/kind/header of the data in the first column and also in the last 7 columns are fixed. The values are dymanic.

    Thanks in advance,

    Gabriel
    01 a 21 jul.xlsm

  2. #2
    Forum Moderator Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: MACRO to transform single column to multiple columns, based in dynamic values

    If I understand your request correctly, to achieve the results on the Second Manual...sheet you just need to use Data Filter Advanced Filter with a a criteria range that excludes blanks in column AB & AC of First Manual...sheet

  3. #3
    Registered User
    Join Date
    08-07-2012
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: MACRO to transform single column to multiple columns, based in dynamic values

    Hi Richard, thank you for your reply. I will use the Data Filter > Advance Filter to solve the second manually step.

    And how about the first manually step? Do you think is possible to develop a macro to run this work automatically?

    Thank you, Gabriel

  4. #4
    Forum Moderator Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: MACRO to transform single column to multiple columns, based in dynamic values

    Hi,

    By the first part do you mean the conversion from the Original sheet to the 'After Macro Flash' sheet? I though that's what your Flash macro was doing, or are you just wanting to do it in a more efficient way?

    If so what's the source of the data? Is it a separate csv/txt file which you currently manually open, copy and paste?

  5. #5
    Registered User
    Join Date
    08-07-2012
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: MACRO to transform single column to multiple columns, based in dynamic values

    Hello Richard. Thanks for your reply.

    The "flash" macro is working fine. I now there are codes that can be improved, however it is not a problem and I can work as it is by now.
    What I am looking for is a macro that automates my 2 manual works after the flash macro, as follows:
    Beside of the columns filled with numbers, Flash macro gives me 2 columns of data, the columns Y and Z (only in this example, can be different columns, however the header (Procv1 and Procv2) and the position are always the same: the last two columns). Today, I take these two columns and do a manual arrangement, organizing the information from these 2 columns in 3 columns, in the example columns AA, AB, AC.
    The new 3 columns are organized following the columns with the header “Procv1” and “Procv2”. If you take a look in the example you will see:

    Rio de Janeiro Praça
    GM Anunciante
    Band Emissora
    Globo Emissora
    Record Emissora
    Sbt Emissora
    Rede TV! Emissora
    ...

    The work I do manual is organize like:

    (Praça) (Anunciante) (Emissora)
    Rio de Janeiro
    Rio de Janeiro GM
    Rio de Janeiro GM Band
    Rio de Janeiro GM Globo
    Rio de Janeiro GM Record
    Rio de Janeiro GM Sbt
    Rio de Janeiro GM Rede TV!

    After this I do to the second manual work that you already give me the solution throughout Data Filter > Advanced Filter

    I hope it is more clear now.


    Thank you, Best, Gabriel

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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