+ Reply to Thread
Results 1 to 7 of 7

VBA is not working properly when Filters are activated

  1. #1
    Registered User
    Join Date
    09-15-2022
    Location
    Georgia
    MS-Off Ver
    365
    Posts
    72

    Question VBA is not working properly when Filters are activated

    Dear Experts,

    by using the below code:

    Please Login or Register  to view this content.
    it allows to insert a new row by copying above cell with existing data on above row/cell and then clean specific range of cells / add specific formula to a cell and insert below.

    It works well when the filters are removed/not actived, but when the filter of any range is active, the VBA code only inserts completely blank row and no data is copied from above row nor below formula is inserted:
    Please Login or Register  to view this content.
    How can this coding be modified when the filters are active to work as it is working even if the filters are not activated?

    Thanks!
    N
    Last edited by nerzzul; 11-18-2022 at 03:17 AM.

  2. #2
    Spammer
    Join Date
    10-23-2012
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2003, Office 365
    Posts
    1,237

    Re: VBA is not working properly when Filters are activated

    I've run this code and the results on my worksheet are identical regardless of whether the filters are activated or not.

    So the problem is likely not in this code. I think you need to put your own sheet up and tell us exactly what you do to recreate the problem.

  3. #3
    Registered User
    Join Date
    09-15-2022
    Location
    Georgia
    MS-Off Ver
    365
    Posts
    72

    Re: VBA is not working properly when Filters are activated

    Hi Croweater,

    enclosed is a spreadsheet with the VBA.

    So the issue only occurring when below criterias are meeting:

    Filters are activated and when Group "+" mode is switched on.

    when these criterias are activated, data located on columns ranged A:F (which is hidden by +) is not copied on down row.

    Filter function is necessary to be used when there are +100s of tasks and Group + is permanently used for A:F as there are just numbering located.

    any feedback is highly appreciated.

    Thanks,
    N
    Attached Files Attached Files

  4. #4
    Spammer
    Join Date
    10-23-2012
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2003, Office 365
    Posts
    1,237

    Re: VBA is not working properly when Filters are activated

    Try copying each cell individually...something like this;

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    09-15-2022
    Location
    Georgia
    MS-Off Ver
    365
    Posts
    72

    Re: VBA is not working properly when Filters are activated

    Hi Croweater,

    its weird thing that this is happening. unfortunately this also has not fixed the issue.

    maybe there could be another alternative of copying selected row one row down? where some areas of the columns could be Grouped by + and hidden, or even password protected?

    Any support is highly appreciated guys.

    it is very important for me to fix this issue.

    Thanks so much in advance.

    Regards,
    N

  6. #6
    Registered User
    Join Date
    04-19-2021
    Location
    Dublin, Ireland
    MS-Off Ver
    O365, Win10 and Mac
    Posts
    47

    Re: VBA is not working properly when Filters are activated

    Filtering does some weird things. See for example https://stackoverflow.com/questions/...-filtered-data

    Best thing to do is in code you can unfilter, do your updates and then re-filter

  7. #7
    Spammer
    Join Date
    10-23-2012
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2003, Office 365
    Posts
    1,237

    Re: VBA is not working properly when Filters are activated

    Yes, it is weird, especially when that code worked fine for me.

    If you put your worksheet up with the changes you made, that doesn't work, I'll have another look.

+ 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. Macro activated by drop-down list - code not working
    By oblongcat in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-22-2015, 09:05 AM
  2. Filters : Not Equals <> with Filters is not working !!!!
    By vishulive in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-04-2015, 01:40 AM
  3. I need a Macros to use 3 filters based on cell value and activated by buttons
    By ferndiazabarca in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-04-2015, 11:01 AM
  4. Filters not working properly
    By rustyg1 in forum Excel General
    Replies: 1
    Last Post: 12-20-2013, 05:12 AM
  5. I can't seem to use filters properly - looking for tips
    By shadestreet in forum Access Tables & Databases
    Replies: 2
    Last Post: 05-05-2009, 03:36 PM
  6. Filters not working properly
    By markmerid in forum Excel General
    Replies: 0
    Last Post: 02-08-2007, 12:35 PM
  7. With Analysis TookPak activated, Workbook_Open Event Not working at all
    By Ronald Dodge in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-12-2006, 03:25 PM

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