+ Reply to Thread
Results 1 to 4 of 4

Looking for First instance of item

  1. #1
    Registered User
    Join Date
    07-02-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    38

    Looking for First instance of item

    Hey all,

    I know this one might seem easy, but I just can't seem to figure it out.

    I would like to write code that takes a column of data, say names, look through that column and highlight/ fill the cell the first time the name appears.

    Anyone ideas?

    Thank you,

    Matt

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Looking for First instance of item

    Hi Matt,

    You can use a formula in conditional formatting to achieve this..

    =countif($A$1:$a1,$a1)=1

    see attachment:- first time occurrence - highlight.xlsx

    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Registered User
    Join Date
    07-02-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: Looking for First instance of item

    Thank you very much, I totally forgot about that. It must be Friday here.

    Now how do it tell it not to do row 1, that is a header row?

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Looking for First instance of item

    delete the conditional formatting from row 1


    see attached:-first time occurrence - highlight.xlsx

    Regards,
    DILIPandey
    <click on below * if this helps>

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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