Closed Thread
Results 1 to 4 of 4

Macro to move rows and organize

  1. #1
    Registered User
    Join Date
    02-03-2009
    Location
    Reno, Nevada
    MS-Off Ver
    Excel 2003
    Posts
    11

    Macro to move rows and organize

    Hello all,

    I have been trying to do this for 3 days using "Record Macro", but something always seems to be messed up. The main problem is that the worksheets are protected and the macro asks for the password.

    Here is a calendar sheet that I've been working on. It contains the calendar on sheet 1(not important) and a client roster on sheet 2. The client roster gets filled quickly, and obviously gets unorganized. What I'd like to do is create a macro so that when a date is entered into column AA (when a client is discharged), that entire row is moved onto sheet 3 (Discharged). At the same time, I'd like all of the names in column A alphabetized.

    I even tried to create an "Organize" button so that the users could just click it and alphabetize. The problem I ran into with that was that the users are using Office 2000, and the names get alphabetized but all of their information no longer matches up.

    I apologize for the extended explanation.
    Attached Files Attached Files
    Last edited by kscott; 03-04-2009 at 06:02 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Macro to move rows and organize

    Hello kscott,

    The following macro has been added to the attached workbook. This copy the discharge patient information and then sort it alphabetically when the discharge date is entered.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    02-03-2009
    Location
    Reno, Nevada
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Macro to move rows and organize

    Thank you for helping, and I hope this doesn't sound unappreciative.

    I might be doing something wrong, but I'm willing to bet I didn't explain something well. Maybe this will sound better. The "Record Macro" feature I've been working on is assigned to a "button" on the top, and it alphabetizes the "Roster" tab. Ideally I would like that button to alphabetize, but first I would like every client (row) that has a date in the "Discharge Date" column to be moved onto the "Discharge" tab.

    The organization of the workbook will be alphabetized, and all clients that have a date in the discharge column will be removed from the Roster tab and placed into the Discharge tab (hopefully also alphabetized, but that's just for convenience).

    One more question-If the row is cut and paste into a different tab, the rows will eventually run out, right? Will adding new rows mess up the macro? Or is there a way to just move the data?

    Thanks again, this will really save a ton of time for about 20 people!

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Macro to move rows and organize

    Hello kscott,

    I wrote the macro based upon what you said in your previous post.
    Here is a calendar sheet that I've been working on. It contains the calendar on sheet 1(not important) and a client roster on sheet 2. The client roster gets filled quickly, and obviously gets unorganized. What I'd like to do is create a macro so that when a date is entered into column AA (when a client is discharged), that entire row is moved onto sheet 3 (Discharged). At the same time, I'd like all of the names in column A alphabetized.
    I am closing this thread as it "solved". If you want answer to your last post, you will need to start a new thread.

Closed 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