+ Reply to Thread
Results 1 to 5 of 5

Macro for Looping Transposition

  1. #1
    Registered User
    Join Date
    03-20-2013
    Location
    Sacramento, CA
    MS-Off Ver
    2010
    Posts
    13

    Macro for Looping Transposition

    I am trying to reorganize a generated report in Excel. As you can see in the attachment (sheet 1 shows a sample of the report as it is generated while sheet 2 shows the desired result), most of the changes are not too difficult to make (deleting certain fields, transposing the headers, etc.). I have been able to successfully record a macro to make these changes. However, I am trying to figure out a way to program a looping macro to transpose the actual data (the entire report with actual data has 700+ rows). I know I can record a macro for this as well, but it is rather time consuming since I can only transpose 4 rows at a time. I'm hoping to code something which I can manipulate in the future in case I have to generate a report for more or less than the 7 days currently shown. I'm thinking that I can have two macros: 1 recorded for the layout changes and the other coded for the actual data transposition.

    Thanks in advance for any assistance.
    Attached Files Attached Files

  2. #2
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Macro for Looping Transposition

    Hi Miroslav,
    try this
    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    03-20-2013
    Location
    Sacramento, CA
    MS-Off Ver
    2010
    Posts
    13

    Re: Macro for Looping Transposition

    Hi Nilem,

    Thank you very much, that code is a great help. Would it be possible to include in the code a provision to maintain the format of the cells? For example, sheet 1 contains data in the format h:mm:ss, but when the macro is run, it reverts to the default general format.

    Also, would you be willing to explain the code and how I can alter it in case the generated report changes in the future? For example, currently there are four different statistical measures: total calls, total hold time, total ACW, and total talk time. However, in the future, additional statistics may be added (they would be generated in the same format).


    Spasiba bolshoye!

  4. #4
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Macro for Looping Transposition

    Hi Miroslav,
    pre-format the entire columns in Sheet2 as needed (this should be done only once) and try this code:
    Please Login or Register  to view this content.
    You can add as many statistical indicators, as needed

    PS you have an excellent Russian-English language
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-20-2013
    Location
    Sacramento, CA
    MS-Off Ver
    2010
    Posts
    13

    Re: Macro for Looping Transposition

    Nilem,

    This is amazing! Thank you again for your help. It is greatly appreciated.

+ 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