+ Reply to Thread
Results 1 to 5 of 5

Duplicate Values In a column of an excel sheet

  1. #1
    Registered User
    Join Date
    06-26-2017
    Location
    Ny, USA
    MS-Off Ver
    2011
    Posts
    16

    Duplicate Values In a column of an excel sheet

    Hello All,

    Requesting help from expert excel users. I am a newbie and learning excel functions and infact this is my first post in the forum.

    My query is how do i highlight the first and second duplicate entry in a column. What I am trying to do is making entries in a column. I want that whenever the first and the second duplicate entry occurs, the cell should be highlighted with a colour. Both with different colours. Example the first occurence with green and second occurence with maybe blue.

    Thanking you in advance for all the help.

  2. #2
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Duplicate Values In a column of an excel sheet

    In the attached I've used a helper column and conditional formatting, assuming that a name will only appear once or twice.
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Duplicate Values In a column of an excel sheet

    One way to do is to use the conditional formatting function in Excel. Highlight the cell range you want to apply conditional formatting, then apply the conditional formatting with formula rule.
    You will have to create two conditional formatting rules since you are highlight two difference occurrences with different color.
    =COUNTIF($A$2:A2,A2) = 1 <-- will be the first occurrence.
    =COUNTIF($A$2:A2,A2) = 2 <-- will be the second occurrence.

    On the Excel workbook I attached, there are screenshots of the rules I used.
    Attached Images Attached Images
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Duplicate Values In a column of an excel sheet

    For cell A3 formula for CF

    For Green colour
    =COUNTIF($A$3:$A3,$A3)=1

    For Blue colour
    =COUNTIF($A$3:$A3,$A3)=2

    Copy CF for other cells including blank cells that may be filled later.
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  5. #5
    Registered User
    Join Date
    06-26-2017
    Location
    Ny, USA
    MS-Off Ver
    2011
    Posts
    16

    Re: Duplicate Values In a column of an excel sheet

    Thank You for the quick response

+ 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. Excel Tutorial: Warning If A Column Has Duplicate Values With Msgbox
    By excel_specialist in forum Tips and Tutorials
    Replies: 1
    Last Post: 02-07-2017, 02:24 AM
  2. Excel Tutorial: Warning If A Column Has Duplicate Values With Msgbox
    By excel_specialist in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-07-2017, 02:24 AM
  3. Replies: 1
    Last Post: 11-03-2016, 03:24 PM
  4. Macro to Copy duplicate values from a column to a separate sheet
    By eemrun in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-13-2013, 05:03 PM
  5. Create a row (or column) of non-duplicate values from a column containing duplicate values
    By 777volkov777 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-17-2013, 11:11 AM
  6. [SOLVED] Need Urgent help on Adjacent values of Duplicate column values should be be in single row.
    By anto_01 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-11-2012, 09:55 PM
  7. Search column a for duplicate data and copy entire row to duplicate sheet
    By crazyAMP in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-20-2012, 08:21 PM

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