+ Reply to Thread
Results 1 to 6 of 6

VBA to organise data into specific rows, using row headers

  1. #1
    Registered User
    Join Date
    06-22-2012
    Location
    Glasgow
    MS-Off Ver
    Excel 2003
    Posts
    13

    VBA to organise data into specific rows, using row headers

    Hi all,
    I have searched through every forum and thread and could not find anything similar to what I am after. If I have missed it then please redirect me.

    I have an excel file that contains data for lubrication oils. This data is copied from a website which posts up the results. However the results arent always in the same order so when copied into the excel file the row order in one sheet does not match the row order in the second sheet. This would be easy to re-organise if there was only a few results but you are talking hundreds of sheets, most of them with different row orders.

    I have created a master row list that I would like to implement throughout the rest of the sheets organising all the data to match the order of this master list (this is to make autogenerating reports easier).

    I have attached a simplified example workbook which will explain what I mean Example.zip

    Thanks

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

    Re: VBA to organise data into specific rows, using row headers

    Hi Stephen, try it (see attachment)

    see also here
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    06-22-2012
    Location
    Glasgow
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: VBA to organise data into specific rows, using row headers

    You Sir are a star, this is exactly what I meant. Thank you very much

  4. #4
    Registered User
    Join Date
    06-22-2012
    Location
    Glasgow
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: VBA to organise data into specific rows, using row headers

    Quick question Nilem, The code is great but I would like to ignore row 1 on every sheet. As row 1 contains different headings for each sheet. That way the code does not ovewrite cell A1 with "SAMPLE" everytime I run it.

    Thanks

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

    Re: VBA to organise data into specific rows, using row headers

    change this line in the code
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    and change this line
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    06-22-2012
    Location
    Glasgow
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: VBA to organise data into specific rows, using row headers

    That did the trick, thanks Nilem

+ 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