Consulting

Results 1 to 4 of 4

Thread: Solved: Duplicates 2

  1. #1

    Solved: Duplicates 2

    Hi

    I have a spreadsheet with Columns A - F. I need to check Col C which is full of Surnames and if the name is repeated under each other I would like to put the word OK in Col F for both of the names. This only needs to happen if the repeated names are adjacent to each other. If the name is repeated a few rows further down then this should not count.

    Is this possible?

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    In F2
    =IF(AND(C2<>"",OR(C2=C1,C2=C3)),"OK","")

    and copy down
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    or
    =IF(COUNTIF(C1:C3,C2)>1,"OK","")
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  4. #4
    Thanks guys, both solutions work great, many thanks.

    Alan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •