Posts by Ax8472

    Re: Weeks Starting Thursday


    Sorry, I did get it working! Thankyou! I was being dozey and putting it into a cell as opposed to the vba code!!! Hahaha


    Works like a charm! :spin:

    Re: Autofilter date range from another cell


    Lovely, that worked amazing for the first one.


    However if I change the second critera, i get a blank result again.


    Code
    ActiveSheet.Range("$K$20:$Q$58").AutoFilter Field:=3, Criteria1:= _
        ">=" & Worksheets(1).Range("AB14"), Operator:=xlAnd, Criteria2:=Worksheets(1).Range("AB16")



    All I did was copy and paste the code and change the cell number.


    Really struggling to get my head around vba :dead:

    Hello everyone.


    Been scratching my head with this one. Any help would be absolutely fantastic, a godsend.


    So I have a table. I'm looking to extract data after applying various filters.


    One of them is the date. I have the date in another cell, and it's in a format of mm/dd/yy.


    Here is the code...


    Code
    ActiveSheet.Range("$K$20:$Q$58").AutoFilter Field:=3, Criteria1:= _
            ">=worksheets(1).AA16", Operator:=xlAnd, Criteria2:="05/26/17"


    For whatever reason, it's not filtering the thing. It doesn't give me an error message to say it's wrong either.


    Can anyone tell me whether this is possible?


    Many thanks


    PS , I also tried the following, and that didn't work either..


    Code
    ActiveSheet.Range("$K$20:$Q$58").AutoFilter Field:=3, Criteria1:= _
            ">=TODAY()-WEEKDAY(TODAY()-7,16)", Operator:=xlAnd, Criteria2:="05/26/17"

    Re: Weeks Starting Thursday


    This was perfect! Thankyou!


    EDIT


    Actually after adding the 16 at the end I couldn't get it to work.


    Any ideas? I've been playing around with it but no luck :s


    Thankyou :)

    Hello again everyone.


    I was wondering if anyone could help me with a problem I'm having.


    I have data that I would like to sort out in terms of yesterday, last month, this week, last week, last week-1 & last week -2.


    The problem I'm having is that I need to start my weeks from a Friday. So the "last week" tab would need the last Friday to the current date. Then the week before would have to be the previous friday to last thursday, etc.


    I'm trying to incorporate as much of the autofilters as I can but I'm really having difficulty with it.


    Anyone got any possible suggestions or able to even just point me in the right direction?


    Many thanks


    :)

    Re: List of options in an autofilter


    I did it, thanks! Feels great. here's the code, fyi.


    hey everyone.


    I hope you can help me, I've been all over google trying to find an answer for this. I've fairly new to VBA so please forgive my lack of skill.


    My issue (i believe) has sound logic, I just can't figure out how to program it in VBA. Here goes...


    I have a table in a tab. I can set an autofilter, it's great. The table has stats for different colleagues.


    [TABLE="width: 500"]

    [tr]


    [td]

    MANAGER

    [/td]


    [td]

    COLLEAGUE

    [/td]


    [td]

    SKILL

    [/td]


    [/tr]


    [tr]


    [td]

    MANAGER1

    [/td]


    [td]

    COLLEAGUE1

    [/td]


    [td]

    467

    [/td]


    [/tr]


    [tr]


    [td]

    MANAGER1

    [/td]


    [td]

    COLLEAGUE1

    [/td]


    [td]

    467

    [/td]


    [/tr]


    [tr]


    [td]

    MANAGER1

    [/td]


    [td]

    COLLEAGUE2

    [/td]


    [td]

    467

    [/td]


    [/tr]


    [tr]


    [td]

    MANAGER1

    [/td]


    [td]

    COLLEAGUE2

    [/td]


    [td]

    467

    [/td]


    [/tr]


    [tr]


    [td]

    MANAGER1

    [/td]


    [td]

    COLLEAGUE2

    [/td]


    [td]

    467

    [/td]


    [/tr]


    [tr]


    [td]

    MANAGER2

    [/td]


    [td]

    COLLEAGUE3

    [/td]


    [td]

    467

    [/td]


    [/tr]


    [tr]


    [td]

    MANAGER2

    [/td]


    [td]

    COLLEAGUE3

    [/td]


    [td]

    467

    [/td]


    [/tr]


    [tr]


    [td]

    MANAGER2

    [/td]


    [td]

    COLLEAGUE3

    [/td]


    [td]

    467

    [/td]


    [/tr]


    [tr]


    [td]

    MANAGER2

    [/td]


    [td]

    COLLEAGUE4

    [/td]


    [td]

    467

    [/td]


    [/tr]


    [/TABLE]



    Now on another tab, I have a row. B10 all the way to M10. What I'd like to do is list each person in the table. So when I click on the Autofilter, it allows me to select which colleague I'd like to filter (colleague 1, colleague 2 etc).
    [TABLE="width: 800"]

    [tr]


    [TD="align: center"][/TD]
    [TD="align: center"]A[/TD]
    [TD="align: center"]B[/TD]
    [TD="align: center"]C[/TD]
    [TD="align: center"]D[/TD]
    [TD="align: center"]E[/TD]
    [TD="align: center"]F[/TD]
    [TD="align: center"]G[/TD]

    [/tr]


    [tr]


    [td]

    9

    [/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    10

    [/td]


    [td][/td]


    [td]

    Colleague1

    [/td]


    [td]

    Colleague2

    [/td]


    [td]

    Colleague3

    [/td]


    [td]

    Colleague4

    [/td]


    [td]

    Colleague5

    [/td]


    [td]

    Colleague6

    [/td]


    [/tr]


    [tr]


    [td]

    11

    [/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    12

    [/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [/tr]


    [/TABLE]


    What i'd like is EACH colleague's name to be populated into the B row. So in B10 you'd have "Colleague1", and in C10 you'd have "Colleague2". All the way until the list of colleagues is exhausted.






    Would anyone be kind enough to help me with this? Much appreciated in advance. :)


    Dan