+ Reply to Thread
Results 1 to 17 of 17

Move and delete rows

  1. #1
    Registered User
    Join Date
    09-21-2009
    Location
    Boston, Ma
    MS-Off Ver
    Excel 2003
    Posts
    9

    Move and delete rows

    Hi,

    I am trying to create a macro the looks at column A and moves the entire row to another worksheet or deletes the entire row based off of the value in each cell. Right now I have the Macro replace the downloaded values to either AG, G, GI, ICP, IMG or delete. The idea be to move all of the values with AG in column A to the AG worksheet, move G to the G worksheet, etc.. and then delete all of those with delete in the cell. This is what I have so far, could someone help me to create this???

    Please Login or Register  to view this content.
    Last edited by Ross86; 09-21-2009 at 03:16 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Need help moving and deleting rows

    Welcome to the forum.

    Please take a few minutes to read the forum rules, and then edit your post to add code tags.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    09-21-2009
    Location
    Boston, Ma
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Need help moving and deleting rows

    Added Code tags

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Need help moving and deleting rows

    CODE tags, please, not PHP tags.

    Thanks.

  5. #5
    Registered User
    Join Date
    09-21-2009
    Location
    Boston, Ma
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Need help moving and deleting rows

    Sorry, code tags added

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Need help moving and deleting rows

    I think this does the same as your code (which you could verify).

    Please Login or Register  to view this content.
    Now you want to move the cells containing "GI" to sheet GI? Just individual cells or entire rows? Move them to the bottom of exsiting data?

  7. #7
    Registered User
    Join Date
    09-21-2009
    Location
    Boston, Ma
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Move and delete rows

    Thanks, that's great. Yeah I want to move all the rows with GI in column A to sheet GI, then move all the rows with AG to sheet AG, etc. There is no existing data on those sheets.

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Move and delete rows

    Will that be the only text in those cells?

  9. #9
    Registered User
    Join Date
    09-21-2009
    Location
    Boston, Ma
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Move and delete rows

    Text in column A, Date in Column B, Text in column C, number value in column D

  10. #10
    Registered User
    Join Date
    09-21-2009
    Location
    Boston, Ma
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Move and delete rows

    But yes, in Column A it will only be either AG, G, GI, IMG, ICP or delete.. nothing else in the column

  11. #11
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Move and delete rows

    Try this (completely untested)O. Post a workbook if it doesn't work.

    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    09-21-2009
    Location
    Boston, Ma
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Move and delete rows

    It doesn't seem to be working. Would it also be possible to add a column with todays date as the last column? I have attached a test file for you.
    Attached Files Attached Files

  13. #13
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Move and delete rows

    See attached.
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    09-21-2009
    Location
    Boston, Ma
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Move and delete rows

    That is Great!! Thank you so much. There is one more thing that would complete this process for me. Is it possible once all of the rows are places on there respective sheets to then go and replace the AG with todays date??

    By that I mean the Sheet names will stay the same, however, column A will display the date in MM/DD/YYYY format. Is this possible?

  15. #15
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Move and delete rows

    Change code as shown below:
    Please Login or Register  to view this content.

  16. #16
    Registered User
    Join Date
    09-21-2009
    Location
    Boston, Ma
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Move and delete rows

    Awesome. Thanks for all of your help!!

  17. #17
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Move and delete rows

    You're welcome. Would you please mark the thread as SOlved?

+ Reply to 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