+ Reply to Thread
Results 1 to 13 of 13

Order the Imported Data

  1. #1
    Registered User
    Join Date
    07-24-2009
    Location
    Constanta
    MS-Off Ver
    Excel 2010
    Posts
    62

    Order the Imported Data

    Hello,
    I kindly ask for your help again to order imported data in a way I can use it. I've attached a sample file. The imported data is on the left and the desired result is on the right.

    Thank you!
    Attached Files Attached Files

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Order the Imported Data

    Have you tried doing a regular sub-total? (Data-Subtotals) This feature creates 3 toggle buttons on the top. Click on the 2nd one and you should get the layout you are looking for. You can then copy it to your desired location.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Order the Imported Data

    Hi delete column F and try this
    Please Login or Register  to view this content.
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  4. #4
    Registered User
    Join Date
    07-24-2009
    Location
    Constanta
    MS-Off Ver
    Excel 2010
    Posts
    62

    Re: Order the Imported Data

    Hello Arlette,
    I am sorry but I need an automated solution (formulas or VBA). Any ideea if/how it can be done?

    Hello Tom,
    Your code works only if I have the name like "NAME*", but in real data names are like "John", "Abby", "Barb"... Can you please update the code?

  5. #5
    Registered User
    Join Date
    07-24-2009
    Location
    Constanta
    MS-Off Ver
    Excel 2010
    Posts
    62

    Re: Order the Imported Data

    Bump no response

    I while back I had a similar problem and a dear member Jerry Beaucaire (JBeaucaire) helped with a very elegant VBA code. Maybe you can get an ideea from that thread ( http://www.excelforum.com/excel-gene...rted-data.html ).
    I really appreciate and need your help!

  6. #6
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Order the Imported Data

    try
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    07-24-2009
    Location
    Constanta
    MS-Off Ver
    Excel 2010
    Posts
    62

    Re: Order the Imported Data

    The code works great, but I also have data on the F column. In this case the code returns only the names but not the amounts. I've tried to modify the code myself but I failed of course . Please modify the code so it works in my case (with the F column containing random data)!
    Thank you!

  8. #8
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Order the Imported Data

    Did your first sample is correct? If not send the sample with original position of data

  9. #9
    Registered User
    Join Date
    07-24-2009
    Location
    Constanta
    MS-Off Ver
    Excel 2010
    Posts
    62

    Re: Order the Imported Data

    I thought it was, but I guess it is not 100% correct. I've attached the new version. In this version I have some data in F column and please note that the number of rows is not limited at 44 (I've tested your code and it already works on the range I select, so that should not matter).
    As a side note: do you think it is possible to inclue the word "SUBTOTAL" as a matching criteria. It is very possible that in the future I'll not get the luxury to get an empty row after every "SUBTOTAL".
    Thank you for your help!
    Attached Files Attached Files

  10. #10
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Order the Imported Data

    Hi
    please note that the number of rows is not limited at 44
    this will be any problem
    As a side note: do you think it is possible to include the word "SUBTOTAL" as a matching criteria
    this also is not the problem
    It is very possible that in the future I'll not get the luxury to get an empty row after every "SUBTOTAL".
    this is problem for now (without empty rows idea with CurrentRegion is useless and the sample is not correct).
    Maybe You have list of names which will appears in table. With this list I think I will handle this

  11. #11
    Registered User
    Join Date
    07-24-2009
    Location
    Constanta
    MS-Off Ver
    Excel 2010
    Posts
    62

    Re: Order the Imported Data

    OK, I'll stick to the present then (emty rows are there). The list of names does not exist, it gets extracted every time after import using your code.

    How to modify the previous code to ignore the data in F column?

  12. #12
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Order the Imported Data

    Ok. this below will ignore column F and also the quantity of rows could be different
    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    07-24-2009
    Location
    Constanta
    MS-Off Ver
    Excel 2010
    Posts
    62

    Re: Order the Imported Data

    SOLVED! Thank you so much!

    Can you explain for dummies what this do:
    Please Login or Register  to view this content.
    Last edited by magicool; 05-17-2012 at 08:35 AM.

+ 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