+ Reply to Thread
Results 1 to 5 of 5

Index Match IF Duplicate

Hybrid View

  1. #1
    Registered User
    Join Date
    03-04-2008
    Posts
    4

    Index Match IF Duplicate

    =ISERROR(INDEX($B$2:$B$4,MATCH(A7,$A$2:$A$4,0)))
    I need this code to first of all check

    IF A7 is not duplicated in the index b2 : b14. If it is duplicated then say duplicate!

    IF A7 is not duplicated then run the code above.
    (ps the code above if there is an error displays "False" how do i get it to display "Error Check"

    Any help is appreciated I am a beginer.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    You're tackling some advanced stuff for a beginner.

    Okay, first your question....
    =IF(ISNUMBER(MATCH(A7,$B$2:$B$14,0)),"Duplicate!","Something Else")
    Where I wrote "Something Else" is where your second equation would go.

    The equation you wrote however
    =ISERROR(INDEX($B$2:$B$4,MATCH(A7,$A$2:$A$4,0)))
    will only return a True or a False depending on whether
    INDEX($B$2:$B$4,MATCH(A7,$A$2:$A$4,0))
    returns an error or not. What exactly are you trying to do with your original formula?

    Assuming you are attempting to retrieve from column B, whatever row you find in column A matching A7, then the formula should be written
    =IF(ISERROR(INDEX($B$2:$B$4,MATCH(A7,$A$2:$A$4,0))),"Error Check",INDEX($B$2:$B$4,MATCH(A7,$A$2:$A$4,0)))
    So the whole thing would be;
    =IF(ISNUMBER(MATCH(A7,$B$2:$B$14,0)),"Duplicate!",IF(ISERROR(INDEX($B$2:$B$4,MATCH(A7,$A$2:$A$4,0))),"Error Check",INDEX($B$2:$B$4,MATCH(A7,$A$2:$A$4,0))))
    ChemistB

  3. #3
    Registered User
    Join Date
    03-04-2008
    Posts
    4

    Wink sorry it ddoesnt work

    =IF(ISNUMBER(MATCH(C1,$A$1:$A$7,0)),"Duplicate!",IF(ISERROR(INDEX($B$1:$B$7,MATCH(C1,$A$1:$A$7,0))),"Error Check",INDEX($B$1:$B$7,MATCH(C1,$A$1:$A$7,0))))
    I have edited the code so it matches what i require but I have one problem. the duplicate issue. if c1 appears more than once between a1 and a7 then there is duplicate so it needs attention. (in an ideal world c1 should only appear once between a1 and a7 but sometimes it appears more than once so i need it to tell me that so I can investigate further.) if it only appears once then indexmatch as above otherwise Error Check.

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    Ahhh, okay you need to use COUNTIF
    =IF(COUNTIF($A$1:$A$7,C1)>1,"Duplicate!", etc...)
    ChemistB

  5. #5
    Registered User
    Join Date
    03-04-2008
    Posts
    4

    thanks

    will give it a whirl

+ 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