Consulting

Results 1 to 3 of 3

Thread: Macro wont run on duplicate columns

  1. #1
    VBAX Newbie
    Joined
    Aug 2020
    Posts
    2
    Location

    Macro wont run on duplicate columns

    Hi everyone,

    I need some help with my macro. Currently, it is only picking up on the criteria in the first 3 columns. I need it to run on my entire worksheet without having to reformat and put all of my data under the first three columns. I want to be able to keep the format as is but still have the macro pick up on the criteria in all the columns. Is this possible to do? I'm new to the macro world so please let me know if something is unclear. Thank you in advance for your help!

    Gabriella

    Here is the code I'm using:
    Sub Test()
    '
    ' Test Macro
    '
    ' Keyboard Shortcut: Ctrl+Shift+T
    '
        Application.CutCopyMode = False
        Application.CutCopyMode = False
        Application.CutCopyMode = False
        Sheets("Operations").Range("A4:N34").AdvancedFilter Action:=xlFilterCopy, _
            CriteriaRange:=Sheets("Operations").Range("V4:V6"), CopyToRange:=Range( _
            "A1:B1"), Unique:=False
    End Sub
    Attached Images Attached Images
    Last edited by Bob Phillips; 08-29-2020 at 02:11 AM. Reason: Added code tags

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    I think it is all a bit unclear Gabriella. You say columns, but the criteria are in rows.

    Can you post the workbook to help us understand?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Newbie
    Joined
    Aug 2020
    Posts
    2
    Location
    Hi Bob, Thank you so much for your response. The first picture shows three sections of the workbook (Friday, Saturday and Sunday are the headers). Underneath those headers, you'll see three columns that say employee name, self cert received and notes. I want the macro to be able to pick up on self-certs that are labeled as "late" or "no". If you look at the second picture, you'll see the macro is only picking up on changes made to the first three columns under Friday (Polly is listed as late) and it's not picking up the data under Saturday and Sunday (Edward and Zack are not listed even though they should be) . Does this clarify the issue I'm having?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •