+ Reply to Thread
Results 1 to 10 of 10

Copy line if deletes my filter

  1. #1
    Registered User
    Join Date
    02-13-2007
    Posts
    28

    Copy line if deletes my filter

    Hey guys, im going nuts on this lol
    im an android programmer with litle experience in VBA..

    i have a sheet called MONDAY that has a column(E) with a filter for status(working,off,vacation..)

    i need to take the rows with status working to another sheet(copy paste)

    it works..but it deletes the filter i have on the MONDAY page?

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: Copy line if deletes my filter

    Sorry if I'm not helping.
    I just wonder what do you mean with this ?
    it deletes the filter i have on the MONDAY page
    Do you mean all the rows of data with status "working" gone ?

    btw, have you checked in case the Monday sheet is still in filtering state ?

    is it possible to add the sheet name before the paste? cause i have multiple status that i would paste in one sheet
    If you mean create a new sheet and name this new sheet, I think it's possible.
    But then you do it "on the go". So there is no Set wsO = Sheets("REPORT"), line.

    Please Login or Register  to view this content.
    What is the value of lrD ?
    Last edited by karmapala; 06-02-2020 at 11:37 AM.

  3. #3
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Copy line if deletes my filter

    You are turning the filter off with this line...
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    02-13-2007
    Posts
    28

    Re: Copy line if deletes my filter

    Quote Originally Posted by dangelor View Post
    You are turning the filter off with this line...
    Please Login or Register  to view this content.
    correct but the filter apply the name i need then stays if i try to look for another value it does not show since filter is activated with the last value?

  5. #5
    Registered User
    Join Date
    02-13-2007
    Posts
    28

    Re: Copy line if deletes my filter

    Quote Originally Posted by karmapala View Post
    Sorry if I'm not helping.
    I just wonder what do you mean with this ?

    Do you mean all the rows of data with status "working" gone ?

    btw, have you checked in case the Monday sheet is still in filtering state ?

    If you mean create a new sheet and name this new sheet, I think it's possible.
    But then you do it "on the go". So there is no Set wsO = Sheets("REPORT"), line.

    Please Login or Register  to view this content.
    What is the value of lrD ?
    correct the sheet MONDAY has a field called status that you select what is the status of the employee.. like working , vaca...
    oups forgot to add it

    lrD = ws0.Cells(Rows.Count, "A").End(xlUp).Row

  6. #6
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Copy line if deletes my filter

    Instead of the 2nd
    Please Login or Register  to view this content.
    try using
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    02-13-2007
    Posts
    28

    Re: Copy line if deletes my filter

    cool il try is there a way to validate the

    Please Login or Register  to view this content.

  8. #8
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Copy line if deletes my filter

    Not sure what you mean by validate?
    Please Login or Register  to view this content.
    Last edited by dangelor; 06-02-2020 at 05:40 PM.

  9. #9
    Registered User
    Join Date
    02-13-2007
    Posts
    28

    Re: Copy line if deletes my filter

    script works.thx! validation is for if there is no workers on Vacation to show nothing...cause now it just copies all ..

  10. #10
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Copy line if deletes my filter

    You're welcome. Glad to help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] VBA filter deletes what I want to keep
    By dgrissom in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-26-2019, 10:16 AM
  2. VBA code to copy line items from form - overriding previous line item
    By dkostyan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-30-2016, 11:19 AM
  3. Filter deletes rows that should not be filtered
    By DaveG93 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-14-2016, 03:35 AM
  4. Replies: 7
    Last Post: 01-18-2015, 06:16 PM
  5. Replies: 0
    Last Post: 12-08-2014, 12:14 AM
  6. Copy pasting from Excel issue - NEW LINE/LINE BREAK
    By denneboom in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-07-2012, 06:40 AM
  7. [SOLVED] Copy to in Adv filter deletes data in lower rows
    By Hari in forum Excel General
    Replies: 0
    Last Post: 05-30-2006, 05:25 AM

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