+ Reply to Thread
Results 1 to 14 of 14

Copy row to another sheet and delete (based on cell content)

  1. #1
    Registered User
    Join Date
    04-19-2010
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    40

    Question Copy row to another sheet and delete (based on cell content)

    Hi guys, I would like to find an alternative to my code which doesnt work properly at the moment.

    Please Login or Register  to view this content.
    I need an efficient code which will copy all the rows with "D" in cell in column L to another sheet (CompeletedOrders) and then delete the rows in Orders sheet.

    Please assist with this, Cheers.
    Last edited by mpower87; 07-05-2010 at 08:18 PM. Reason: solved

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Copy row to another sheet and delete (based on cell content)

    hi mpower87
    at a glance
    Please Login or Register  to view this content.
    or find syntax mabe be a better option
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Registered User
    Join Date
    04-19-2010
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    40

    Re: Copy row to another sheet and delete (based on cell content)

    hi pike,

    thanks for your reply. can you please explain what you mean there? and i tried that code but it doesnt work...

  4. #4
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Copy row to another sheet and delete (based on cell content)

    Hi mpower87,
    try..
    Please Login or Register  to view this content.
    Last edited by pike; 07-02-2010 at 03:02 AM.

  5. #5
    Registered User
    Join Date
    04-19-2010
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    40

    Re: Copy row to another sheet and delete (based on cell content)

    hi mate, thanks for that, i tried it as:
    Please Login or Register  to view this content.
    Unfortunately this resulted in an error:
    Run-time error '1004':

    Copy method of Range class failed

  6. #6
    Registered User
    Join Date
    04-19-2010
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    40

    Re: Copy row to another sheet and delete (based on cell content)

    no one else can have a crack at this?

  7. #7
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Copy row to another sheet and delete (based on cell content)

    dude can you attach a sample workbook to play with

  8. #8
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Copy row to another sheet and delete (based on cell content)

    change this bit
    Please Login or Register  to view this content.

  9. #9
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Copy row to another sheet and delete (based on cell content)

    or
    Please Login or Register  to view this content.

  10. #10
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Copy row to another sheet and delete (based on cell content)

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    04-19-2010
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    40

    Re: Copy row to another sheet and delete (based on cell content)

    hi guys, thanks for you for your replies. unfortunately i can't get your code to work

    attached is a dummy file that may assist you with helping me. i appreciate your time. cheers.
    Attached Files Attached Files

  12. #12
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Copy row to another sheet and delete (based on cell content)

    mpower87, matie, mate, maaaaate

    You FORGOT to mention the worksheet change event!!!!!!
    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    04-19-2010
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    40

    Re: Copy row to another sheet and delete (based on cell content)

    hah, well I'm still a noob when it comes to vba. thanks for pointing that out and making a working piece of code pike. much appreciated. kudos to you mate

  14. #14
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Copy row to another sheet and delete (based on cell content)

    Hey mpower87

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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