Posts by Shawn Michaels

    Hi,


    I intend to use advanced filter for more than 20 times across the whole project, so I am trying to create a reusable advanced filter sub procedure as given below but getting errors.



    I would highly appreciate any help.


    Regards

    Shawn

    Hello,


    My data is setup in this way:


    Date Day Area Product SalesmanName
    01/07/2021 Thu A1 Prod-1XN Salesman1
    01/07/2021 Thu A1 Prod-1XN Salesman1
    01/07/2021 Thu A1 Prod-1XN Salesman1
    01/07/2021 Thu A1 Prod-1XN Salesman1
    01/07/2021 Thu A1 Prod-1XN Salesman1
    01/07/2021 Thu A2 Prod-1XN Salesman1
    01/07/2021 Thu A2 Prod-1XN Salesman1
    01/07/2021 Thu A2 Prod-1XN Salesman1
    02/07/2021 Thu A1 Prod-1XN Salesman1
    02/07/2021 Thu A1 Prod-1XN Salesman1
    02/07/2021 Thu A1 Prod-1XN Salesman1
    02/07/2021 Thu A1 Prod-1XN Salesman1
    02/07/2021 Thu A1 Prod-1XN Salesman1
    02/07/2021 Thu A2 Prod-1XN Salesman1
    02/07/2021 Thu A2 Prod-1XN Salesman1
    02/07/2021 Thu A2 Prod-1XN Salesman1




    The Cell F2 has Salesman name and in G2, I need a formula, which will count the salesman visits in areas on all dates.


    So in this case, the formula should return 4 (on 1st July, he visited 2 areas, on 2nd July, he visited 2 areas).


    The pivot tables are counting salesman's name and giving me count of 16, which is not the right answer.


    Highly appreciate your help.


    Many thanks

    Dear Bosco,


    Thank you very much for your reply.


    It shows Match and No Match but for some strings, it still shows Match when there is none. For example,


    A2: Feelings: A Baby and Blue Book-------------------------------------------------------B2: Payback (Fearless, No. 6)

    A3: Goldberg, Lee: The Death Merchant (Diagnosis Murder # 2)---------------B3: Sun Hawk

    A4: Treasure Island and Other Cartoon--------------------------------------------------B4: I Who Have Never Known Men

    A5: Harry Potter and the Sorcerers Stone-----------------------------------------------B5: The Changing of the Guard (Star Wars: Jedi Quest)



    Thank you very much for your help.


    Regards

    Hello :),


    I am trying to do partial match based on words in both columns.


    I have two data in Col A and Col B and the formula goes in Cell C2 and down till last row.



    So for example, I have these in A2 and B2.


    A2: The White Lion King ---------B2: The Lion King -----------------------------C2: Formula should return Match because 3 words from B2 match A2

    A3: Brown Horse -------------------B3: Lazy Fox ------------------------------------C3: Formula should return No Match because words don't match

    A4: The Great Scientist -----------B4: The Great Newton Scientist---------C4: Formula should return Match because 3 words match


    I am trying to do it with Search formula. Tried find as well but to no avail. What formula can we use here for partial match.



    Many thanks

    Hello,


    I have a userform with following controls:


    TextBox1 for Date (which is to be found using find)

    TextBox2 for Text to be entered in worksheet

    Listbox2 which contains the items (which are to be found using find)


    So when I click the commandbutton, the code should look the items in the listbox2 and the relevant date column and enter the textbox2 value in relevant cell.


    I am using the following code, which is not working:



    I would highly appreciate help.


    Many thanks :)

    Hello,


    I am trying to create a find and findnext with do until loop but getting error.


    My 2 Criteria are in Sheet 1("CreateList") : ProductNum in cell B4 and Product Name in cell B5.


    On Sheet 2 ("List"), I have IDs and multiple product names (in a table) associated with that ID. So When I find a particular ID, I check the name in next column matches Criteria in Sheet 1. If it doesn't, the loop should continue until Find matches both criteria from Sheet 1 but I am not able to code that.


    Here is my code:


    Thank you for your help.


    Regards

    Here is the Data Table, and the current region can take care of its growth.


    Products Day Product Set
    Product 1 Sat Set 1
    Product 2 Sat Set 2
    Product 3 Sun Set 1
    Product 4 Sun Set 2
    Product 5 Fri Set 1


    Here is the final table:


    Date Day Product Set Product
    11/09/2020 Fri Set 1 Product 5
    12/09/2020 Sat Set 1 Product 1
    12/09/2020 Sat Set 2 Product 2
    13/09/2020 Sun Set 1 Product 3
    13/09/2020 Sun Set 2 Product 4
    18/09/2020 Fri Set 1 Product 5
    19/09/2020 Sat Set 1 Product 1
    19/09/2020 Sat Set 2 Product 2
    20/09/2020 Sun Set 1 Product 3
    20/09/2020 Sun Set 2 Product 4
    25/09/2020 Fri Set 1 Product 5
    26/09/2020 Sat Set 1 Product 1
    26/09/2020 Sat Set 2 Product 2
    27/09/2020 Sun Set 1 Product 3
    27/09/2020 Sun Set 2 Product 4
    02/10/2020 Fri Set 1 Product 5
    03/10/2020 Sat Set 1 Product 1
    03/10/2020 Sat Set 2 Product 2


    There are 2 more Sunday (04/10/2020) rows and 1 Friday (09/10/2020) row, which the final table doesn't show.

    Thanks for the code Dangelor and your efforts. Your are truly a gem of a professional coder.


    I have 2 relevant questions.


    1. If my data table (A8:C11) grows, then I only have to change C11 to C12 or C13 because I think the lines like "The For i = 4 To d2 - d1 + 4", the number 4 means the data table's 4 rows ? Is this possible in the code?


    2. In your recent code, some last dates are not showing, for example, the result table stops on 04/10/2020 Sunday if I choose 2 Sat, 1 Sun, 1 Fri. The next Fri which is on 9th Oct should also show in the final table.


    Thank you for your cooperation and support.

    Hello


    I have tried that too but still the problem arises when same Day has to sets. It is only giving row for 1 set not for the Set 2 on the same day.


    I guess, I will have to change my data table structure to find solution. If you think there is a better way to set the data table (A8:C11), I will adopt that .


    I am also thinking to make one like this:


    Product 1 Product 2 Product 3 Product 4
    Mon
    Tue
    Wed
    Thu
    Fri Set 1
    Sat Set 1 Set 2
    Sun Set 1 Set2



    Thanks