+ Reply to Thread
Results 1 to 12 of 12

A Sorting Issue

  1. #1
    Registered User
    Join Date
    04-15-2013
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    84

    A Sorting Issue

    I have a datafile that is generated and placed in sheet1. Based on some markers, I am pasting filtered rows into new sheets2-7. What do people use to automate the process if those markers are always the same, and this process needs to be replicated often enough that it is bothersome to do so manually?

    Thanks for the advice,

    Vichisov

  2. #2
    Forum Contributor aganesan99's Avatar
    Join Date
    04-26-2013
    Location
    Chennai, India
    MS-Off Ver
    Excel 2010
    Posts
    129

    Re: A Sorting Issue

    Hi Vichisov,

    Can you post a sample file so that it can be done by macro.

    Thanks,
    aganesan99

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,719

    Re: A Sorting Issue

    If you have the same criteria each time you need to filter and cut and paste, then I would develop some automation. If you post your worksheet with the criteria, I am sure that someone here can help you develop some VBA that will save you lots of time and energy.

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Forum Contributor aganesan99's Avatar
    Join Date
    04-26-2013
    Location
    Chennai, India
    MS-Off Ver
    Excel 2010
    Posts
    129

    Re: A Sorting Issue

    Hi,

    This macro might work for you...

    Please Login or Register  to view this content.
    Last edited by alansidman; 11-12-2013 at 12:41 PM. Reason: Code Tags added

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,719

    Re: A Sorting Issue

    @aganesan99

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (I have added the code tags on this post to allow it to continue without interruption. Please read all our rules and abide by them.)

  6. #6
    Registered User
    Join Date
    04-15-2013
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    84

    Re: A Sorting Issue

    Everyone thanks for the replies!

    The attached doc is the sample; cut down significantly and simplified. I realize it is not terribly difficult to just use the filter function, but I have other similar applications and am trying to learn a new trick.

    Sorting Sample.xlsx

  7. #7
    Forum Contributor aganesan99's Avatar
    Join Date
    04-26-2013
    Location
    Chennai, India
    MS-Off Ver
    Excel 2010
    Posts
    129

    Re: A Sorting Issue

    Hi vichisov,

    Please find attached the Sample file which has macro in it. Run it and it'll be useful.

    If you need additional filters and tabs to be created please revert back

    Thanks,
    aganesan99
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    04-15-2013
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    84

    Re: A Sorting Issue

    Awesome! This looks great.

    I am looking forward to deconstructing it and figuring out how you put it together.

    Thank you,

  9. #9
    Registered User
    Join Date
    04-15-2013
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    84

    Re: A Sorting Issue

    Hello aganesan99,

    What does ActiveWindow.SmallScroll Down:=3 do? You only have it when multiple fields are being selected. Happens to be also the first one.

    Also there is this: Application.CutCopyMode = False that I do not understand 100%

  10. #10
    Forum Contributor aganesan99's Avatar
    Join Date
    04-26-2013
    Location
    Chennai, India
    MS-Off Ver
    Excel 2010
    Posts
    129

    Re: A Sorting Issue

    Hi Vichisov,

    Delete those lines. It will not impact the macro.

    I think you liked it, click on my "Add reputation".

    Thanks,
    aganesan99

  11. #11
    Registered User
    Join Date
    04-15-2013
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    84

    Re: A Sorting Issue

    Where is the add reputation button?

  12. #12
    Registered User
    Join Date
    04-15-2013
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    84

    Re: A Sorting Issue

    So I just noticed that the way the script works, it creates unmanageable files. In this case 96 mb. In its current form, this is probably not going to work. Is there a way to cur the range down?
    Last edited by vichisov; 11-14-2013 at 10:54 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Sorting Issue
    By excelbobabc in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-11-2011, 10:49 AM
  2. sorting issue
    By step_one in forum Excel General
    Replies: 1
    Last Post: 10-12-2011, 06:30 PM
  3. Sorting issue
    By Wayne Knazek in forum Excel General
    Replies: 5
    Last Post: 10-29-2008, 04:12 PM
  4. big sorting issue
    By iknownothing in forum Excel General
    Replies: 2
    Last Post: 03-28-2007, 04:34 PM
  5. Sorting Issue
    By Mada in forum Excel General
    Replies: 3
    Last Post: 01-23-2007, 03:54 PM

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