Remove all but first duplicate

  • Thank you.


    1. There are Two SLA Types ... Response And Fix ... each one does require its own treatment.

    2. Within the Response SLA Type, there are two different rules for the Three Task Types : a) PRTG And b) SQL,RDS (same rule)

    3. For the PRTG Task Type, the rule is to Keep the one showing in SLA Column 'Incident First Assignment and Remove all other DUPLICATE instances

    4. For the SQL or RDS Task Types, the rule is to Keep the one showing in SLA Column 'Incident First Response' and Remove all other DUPLICATE instances.

    5. Within the Fix SLA Type, one single rule applies, which is to Keep P1 and Remove all other instances - Keep the highest Priority which can range from P1 (highest) to P4(lowest). INCxx may have P2 and P4 linked to it - Keep P2, remove P4, for INCyy make have P1, P2 and P3 linked to it - Keep P1, remove P2 and P3.

    6- Each INC must have 1 Response and 1 Fix linked to it, after removing duplicates based on above rule. But some may have 0 Response or 0 Fix linked to it. I need to find a way to highlight them in any way you seem fit.

  • Thank you.


    1. There are Two SLA Types ... Response And Fix ... each one does require its own treatment.

    2. Within the Response SLA Type, there are two different rules for the Three Task Types : a) PRTG And b) SQL,RDS (same rule) - So actually PRTG is an exception. The same rule to keep ' Incident First Response' applies to any other than PRTG, which includes SQL, RDS.

    3. For the PRTG Task Type, the rule is to Keep the one showing in SLA Column 'Incident First Assignment and Remove all other DUPLICATE instances

    4. For the SQL or RDS Task Types, the rule is to Keep the one showing in SLA Column 'Incident First Response' and Remove all other DUPLICATE instances.

    5. Within the Fix SLA Type, one single rule applies, which is to Keep P1 and Remove all other instances - Keep the highest Priority which can range from P1 (highest) to P4(lowest). INCxx may have P2 and P4 linked to it - Keep P2, remove P4, for INCyy make have P1, P2 and P3 linked to it - Keep P1, remove P2 and P3.

    6- Each INC must have 1 Response and 1 Fix linked to it, after removing duplicates based on above rule. But some may have 0 Response or 0 Fix linked to it. I need to find a way to highlight them in any way you seem fit.

  • Thanks for your Recap :)


    Looks like we have finally reached ... the starting line ...;)

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • ?? Waiting for the Marco magic now ?

    Agree ... :)


    Will have to build it with your ... six building blocks ...;)


    Challenge is " how on earth ... can all these rules be translated into VBA " =O

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Based on an initial test ... there seems to be ...still ... one point to further clarify ...


    Regarding Rows 10 and 12, we are dealing with SQL and RDS ... which should follow the same rule ...

    to delete SLA showing : " Incident First Assignment "


    which is apparently not the case ...


    Thanks for your clarification

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • OK ... first step


    You could test following



    Hope this will help

    :)

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Thank you and sorry to be a pain. The second section needs to be more dynamic. Kind of looking for a way to delete first assignment from ANY duplicate Response rows, except for the PRTG(which has a different rule). My data set is not likely to be limited to SQL and RDS.

  • Thank you and sorry to be a pain. The second section needs to be more dynamic. Kind of looking for a way to delete first assignment from ANY duplicate Response rows, except for the PRTG(which has a different rule). My data set is not likely to be limited to SQL and RDS.


    Not sure to understand your message ...


    The macro RemoveDupsResponse is supposed to handle all possible cases whenever the SLA Type is Response ...


    Does it produce the expected result ... or not ...???

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • It did produce the expected result. But in future I can have a few more ticket types in addition to PRTG, sql and RDS.

    .AutoFilter Field:=6, Criteria1:="=RDS", Operator:=xlOr, Criteria2:="=SQL

    Makes it more static. Can a logic be created that for ANY duplicate response other than PRTG removes first assignment please.

  • Got it ... ;)


    Below is the modification ...


    Hope this will help

    :)

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Thanks alot Carim. That should work, I will try it in couple of hours.

    Would you have some time to put thought for :


    5. Within the Fix SLA Type, one single rule applies, which is to Keep the highest Priority which can range from P1 (highest) to P4(lowest). INCxx may have P2 and P4 linked to it - Keep P2, remove P4.. INCyy may have P1, P2 and P3 linked to it - Keep P1, remove P2 and P3.

    6- Each INC must have 1 Response and 1 Fix linked to it, after removing duplicates based on above rule. But some may have 0 Response or 0 Fix linked to it. I need to find a way to highlight them in any way you seem fit.

  • You are welcome :)


    Once you are in position to test ...(and hopefully validate ...;)) the first macro ... it will be the first relief ...!!!


    Then, we will be confronted with the next stumbling blocks ...and proceed step-by-step 8o...

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Great News ...!!! :)


    Thanks a lot for your Thanks ...AND for the Like :thumbup:


    By the way regarding the dynamic range... change the instruction to :

    Code
    Set rng = Sheet1.[A1].CurrentRegion


    Hope this will help

    :)

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Regarding the next two issues still pending ... both problems do require to handle each Task INC individually ...


    Indeed the Highest Priority is, by definition, the Smallest Priority Number ... which is related to each INC ....


    Will post a proposal as quickly as possible ...;)

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Thank you.

    What does 12 signify in SpecialCells(12) ?

    It means: xlCellTypeVisible


    Hope this will help

    :)


    P.S. To make code clearer .... you are right ... should have used SpecialCells(xlCellTypeVisible)

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!