+ Reply to Thread
Results 1 to 3 of 3

macro help for transposing data and deleting rows

  1. #1
    Registered User
    Join Date
    12-12-2012
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2010
    Posts
    2

    macro help for transposing data and deleting rows

    HI I need help in creating a macro to manipulate some data so that it's in a format that can be more easily understood and use for graphing. Basically this macro would need to look at 3 different parameters that are located in 3 different columns (col A, B, C), let's say row # is represented by n
    So it would be something like if A(n) = A(n+1) then continue looking at the next row until A(n) not equal to A(n+1), and this goes on at the 3 different columns and as soon as it find the row where the 2 consecutive cells are not equal then it would start the transpose pasting sequence and deleting the rows with the same values in columns A, B, C except for the very first row where the transposed value is now located. I know this may sound confusing so I've attached the sample file with the first tab being the raw data and the second tab being the sample of the final result. I've been doing this manually and figured that it just takes way too long and seems like something that could be done via a macro- I just couldn't quite figure out how to do it yet. Any help would be greatly appreciated. THANKS in advance.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    12-18-2012
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: macro help for transposing data and deleting rows

    This seems better suited to a straight pivot table. Select the whole dataset (including titles), goto Insert tab then pivot table and OK. When new sheet with pivot table is generated, drag the ID, SAMPLENUM and ANAYSISTYP fields into the Rows box, the elements field into the Columns box and the values field into the Values box and thats it done.

  3. #3
    Registered User
    Join Date
    12-12-2012
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: macro help for transposing data and deleting rows

    ahhh... why didn't I think of that. That is a great idea, I guess I was just too hang up on the idea of doing it with a macro and forgot about the obvious. THANKS J450n

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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