+ Reply to Thread
Results 1 to 8 of 8

Highlight Duplicate Rows for an Action Number

  1. #1
    Registered User
    Join Date
    04-17-2023
    Location
    Saskatchewan
    MS-Off Ver
    2016
    Posts
    16

    Highlight Duplicate Rows for an Action Number

    The attached workbook indicates 6 Action Numbers, each with multiple rows and eight columns. Each Action Number has a series of Step Codes. The task is to highlight when an action number has a duplicate Step Code with the same role. The attached workbook, row 1, indicates this task. I have highlighted the first Action Number showing the results I am needing to achieve. Many thanks.
    Attached Files Attached Files

  2. #2
    Forum Contributor John Vergara's Avatar
    Join Date
    01-17-2022
    Location
    Colombia
    MS-Off Ver
    365
    Posts
    209

    Re: Highlight Duplicate Rows for an Action Number

    Hi WPonto:

    Use this formula into Conditional Formatting (CF), leaving active A3 cell:
    PHP Code: 
    =COUNTIFS($A$3:$A$44,$A3,$D$3:$D$44,$D3,$H$3:$H$44,$H3)>
    Check file with the CF applied. Blessings!
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    04-17-2023
    Location
    Saskatchewan
    MS-Off Ver
    2016
    Posts
    16

    Re: Highlight Duplicate Rows for an Action Number

    Thank you so much. If I want to take this one step further now, using the workbook you attached showing the CF, would it be possible to delete the Action Numbers that do not have any CF applied? In the attached workbook, for example, that would be rows 19 - 25 for Action 125692; rows 30 - 36 for Action 125716.

  4. #4
    Forum Contributor John Vergara's Avatar
    Join Date
    01-17-2022
    Location
    Colombia
    MS-Off Ver
    365
    Posts
    209

    Re: Highlight Duplicate Rows for an Action Number

    Hi again, Wponto!

    The original question of this topic is solved. If you want to ask for anything else apart of your original question, please open a new thread. Blessings!

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,659

    Re: Highlight Duplicate Rows for an Action Number

    Quote Originally Posted by John Vergara View Post
    The original question of this topic is solved. If you want to ask for anything else apart of your original question, please open a new thread. Blessings!
    Hi, I think keep going with this topic is better than open new thread, because he use same sample file, just added requirement.
    HI WPonto,
    Try to add below formula in column I, then fiter for "TRUE" then delete
    Please Login or Register  to view this content.
    For Ex2016 or older, confirm with Ctrl-Shift-Enter combination.
    Attached Files Attached Files
    Quang PT

  6. #6
    Registered User
    Join Date
    04-17-2023
    Location
    Saskatchewan
    MS-Off Ver
    2016
    Posts
    16

    Re: Highlight Duplicate Rows for an Action Number

    A big "thank you" to bebo021999 as this is magic; will save me hours moving forward. My workbook has 15107 rows and Excel is not copying the formula down with ease; some rows the formula stops and inputs 0; I then repeat the process and wait; patiently. I also experience Excel freezes when I try to filter a column when there are excessive rows. In any event, the formula works despite my Excel issues (at work).

  7. #7
    Forum Contributor John Vergara's Avatar
    Join Date
    01-17-2022
    Location
    Colombia
    MS-Off Ver
    365
    Posts
    209

    Re: Highlight Duplicate Rows for an Action Number

    Hi to both!

    I think formula way is very expensive (in terms of performance) for the machine. If you want another approach, I recommend Power Query. Check this code:

    PHP Code: 
    let
        Source 
    Excel.CurrentWorkbook(){[Name="Table16"]}[Content],
        
    ChangeType Table.TransformColumnTypes(Source,{{"Action No."Int64.Type}, {"Action Status"type text}, {"Date Submitted"type date}, {"Step Code"Int64.Type}, {"Code) Start Date"type date}, {"Code) End Date"type date}, {"Descr"type text}, {"Role Status"type text}}),
        
    GroupRows Table.Group(ChangeType, {"Action No."}, {{"Count"each Table.RowCount(_), Int64.Type}, {"AllRows"each _type table}}),
        
    Comp 
            
    let
                GroupRows 
    Table.Group(ChangeType, {"Action No.""Step Code""Role Status"}, {{"Count"each Table.RowCount(_), Int64.Type}}),
                
    GroupRows2 Table.Group(GroupRows, {"Action No."}, {{"Count"each Table.RowCount(_), Int64.Type}})
            
    in
                GroupRows2
    ,
        
    Join Table.NestedJoin(GroupRows, {"Action No."}, Comp, {"Action No."}, "Join"JoinKind.LeftOuter),
        
    ExpandCount Table.ExpandTableColumn(Join"Join", {"Count"}, {"Count2"}),
        
    SelectRowsEqCount Table.SelectRows(ExpandCounteach [Count] = [Count2]),
        
    RemoveColumns Table.RemoveColumns(SelectRowsEqCount, {"Count""Count2"}),
        
    ExpandCols Table.ExpandTableColumn(RemoveColumns"AllRows", List.RemoveItems(Table.ColumnNames(Source), {"Action No."}))
    in
        ExpandCols 
    Check file with M Code applied. If you change the table source, right clic in green table and update (like a pivot table). Blessings!
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    04-17-2023
    Location
    Saskatchewan
    MS-Off Ver
    2016
    Posts
    16

    Re: Highlight Duplicate Rows for an Action Number

    Hi John. Thank you for an alternate approach as yes, it is using a lot of Excel resources. I need to take a Power Query course as your solution is beyond my experience and comprehension. I will keep this for future reference.

+ 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. [SOLVED] Need to Highlight Duplicate Rows Fully
    By maddyrafi1987 in forum Excel - New Users/Basics
    Replies: 6
    Last Post: 03-04-2022, 12:28 AM
  2. Highlight or display duplicate rows not duplicate values
    By olga6542 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-20-2019, 03:24 PM
  3. highlight duplicate rows
    By VBisgreat in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-11-2016, 09:30 AM
  4. Highlight duplicate rows based off 9 first characters of my 12 character long number
    By girl_alex in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-18-2014, 06:55 PM
  5. [SOLVED] highlight duplicate rows using textbox
    By cfinch100 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-04-2013, 12:53 PM
  6. Highlight and count duplicate rows
    By dmc31 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-18-2012, 01:37 PM
  7. highlight duplicate rows
    By dan2010 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-31-2010, 04:09 AM

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