+ Reply to Thread
Results 1 to 6 of 6

Macro to cut a row from one Worksheet and paste in another

  1. #1
    Registered User
    Join Date
    05-04-2007
    Posts
    3

    Macro to cut a row from one Worksheet and paste in another

    I have created a workbook that comprises of 6 worksheets and I wish to create a Macro so that a row is automatically cut from one worksheet and pasted to another once the Status column changes.

    The Status column (E) in worksheet 'Infrastructure CERs & RFCs' uses a lookup table to set the status depending on the information input into the row. What I want is for the whole row to be automatically cut and pasted to another worksheet called 'Released RFCs' once the Status changes to 'Released'.

    Similarly, if the status changes to 'Closed' or 'Withdrawn' then I want this row to be automatically cut and pasted to the 'Closed or Withdrawn Changes' worksheet.

    Also, the spreadsheet is shared and I can't protect the worksheets because I need to cut and paste rows to altrenate sheets, as above. If I do create a Macro will I then be able to protect certain cells?

    Please note that I have never used VBA before. Any help much appreciated.
    Last edited by decampo; 10-22-2007 at 07:13 AM.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi

    This site will get you started. Once you have figured out the filter part then upload a sample file and we will look at the automatic part

    http://www.rondebruin.nl/copy5.htm#Add

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Please read forum rules below and then wrap your code

    VBA Noob

  4. #4
    Registered User
    Join Date
    05-04-2007
    Posts
    3
    Thanks for your help but being a complete VBA noob I struggled with the guide you kindly provided. Also, I hope I've wrapped the code properly this time. This is what I have found on the net. I initiate the code by pressing ctrl+q.

    Please Login or Register  to view this content.
    However, when I protect the sheet the macro will not run as some cells have locked and hidden formulas. Is there a way I can run the macro while the sheet is protected?

  5. #5
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Try

    Please Login or Register  to view this content.
    VBA Noob

  6. #6
    Registered User
    Join Date
    05-04-2007
    Posts
    3
    Thanks for your help, worked a treat! However, for some reason once the sheet is protected and the box is ticked to allow Auto Filter, after the Macro is run I can no longer use Auto Filter unless I unprotect the sheet again. Any suggestions?

    Also, when using the countif formula how can I count information from two worksheets?

    Finally, I have another worksheet that I wish from time to time to be able to delete the entire row. Again, I want the sheet to be protected but I don't want the data to be cut and pasted elsewhere, just deleted from worksheet altogether. How could I achieve this?
    Last edited by decampo; 10-22-2007 at 11:13 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