+ Reply to Thread
Results 1 to 4 of 4

URGENT: Macro to cut a row and paste in new spreadsheet if specific word entered in column

  1. #1
    Registered User
    Join Date
    02-05-2013
    Location
    Sussex, England
    MS-Off Ver
    Excel 2003
    Posts
    2

    URGENT: Macro to cut a row and paste in new spreadsheet if specific word entered in column

    Hi

    I'm a first time user so please let me know if I have posted this incorrectly (and accept my apologies at the same time!). I'll try to be concise but please ask me if anything that is unclear.

    In a nutshell: I have a worksheet named Corporate and another named COMPLETE. The latter has the exact same headers as Corporate but has no data. The worksheet Corporate has data in. In column G (of Corporate) I have the words 'Pipeline' entered or 'Underway' entered. At some point these will changed to 'Completed'. When this happens I would like the row to be cut from this worksheet (Corporate) and pasted into the other worksheet (COMPLETE).

    At present in Corporate the range of cells with data in starts at A8 with the last cell being CW53 (more rows will be added but will be done so within this range so the row which currently stands at 53 will always be the last row - does that make sense?). The word 'completed' will ONLY appear in column G.

    The row being pasted into the COMPLETE worksheet can be done so at A6 and can always be put here so newest entry appears at the top.

    I'm hoping I have been clear but please ask anything. This is a confidential workbook so would prefer not to post, however if my explanation is confusing I can quickly mock up a blank document.

    I need to have this done by tomorrow morning so any swift replies would be extremely appreciated.

    Thank you for any help and advice!

    AddyJ0e

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: URGENT: Macro to cut a row and paste in new spreadsheet if specific word entered in co

    Place the following code into the worksheet module for Sheet("Corporate") ... not into a regular module.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    02-05-2013
    Location
    Sussex, England
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: URGENT: Macro to cut a row and paste in new spreadsheet if specific word entered in co

    Thank you Mumps1 for replying so quickly!

    I'm getting an error - runtime 424 error.....had this on a previous macro I tried but couldn't sovle it!

    If Intersect(Target, Range("G:G")) Is Nothing Then Exit Sub

    (not sure how to put that in a code as above sorry)

    Thank you

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: URGENT: Macro to cut a row and paste in new spreadsheet if specific word entered in co

    I tried it on a dummy file and it worked for me. Would it be possible for you to post a copy of your file?

+ 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