+ Reply to Thread
Results 1 to 5 of 5

Macro Or VBA code needed for sorting,matching and copying on to relevant sheet

  1. #1
    Forum Contributor
    Join Date
    12-07-2009
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    117

    Exclamation Macro Or VBA code needed for sorting,matching and copying on to relevant sheet

    Hi Guys

    I need a macro or VBA, how to get excel to sort data,and match them then copy,paste them on to relevant sheets on same work book,

    attached sheet example, what i have,

    could anyone help with codes?

    Many thanks
    Ben
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro Or VBA code needed for sorting,matching and copying on to relevant sheet

    Try this:
    Please Login or Register  to view this content.
    It will create the sheets as needed, put them in alphabetical order and parse the rows of data to each sheet. It will count how many rows of data are on the first sheet and compare that to how many rows are moved to other sheets and give you the totals as a comparison to make sure they match...they always should, but you never know.
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    12-07-2009
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    117

    Thumbs up Re: Macro Or VBA code needed for sorting,matching and copying on to relevant sheet

    Dear JBeaucaire
    Thanks for quick response
    thats what i was looking for,
    one more thing, Can you include Scan date & Due Columns for me,

    Many thanks

    Kind regards
    Ben
    Last edited by shg; 12-12-2009 at 07:18 PM. Reason: deleted spurious quote

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro Or VBA code needed for sorting,matching and copying on to relevant sheet

    This is the line of code that determines how wide the copy is:
    Please Login or Register  to view this content.
    Change the "D" to whatever column you want to be the last column copied.


    =============
    NOTE: Unless you're quoting something specific, there's no need to use the QUOTE button, the QUICK REPLY makes a cleaner thread, easier to read.

    =============


    If that takes care of your need, be sure to EDIT your original post, click Go Advanced and mark the PREFIX box [SOLVED].



    (Also, use the blue "scales" icon in our posts to leave Reputation Feedback, it is appreciated. It is found across from the "time" in each of our posts.)

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro Or VBA code needed for sorting,matching and copying on to relevant sheet

    For reference, here is the most uptodate version of this macro. It provides a quick and easy way to customize the macro in the first 3 lines of command code.
    Please Login or Register  to view this content.

    Did the one provided work for you? You never indicated by closing this thread.

+ 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