+ Reply to Thread
Results 1 to 8 of 8

countif - issue (no duplicates)

  1. #1
    Forum Contributor
    Join Date
    04-27-2011
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    113

    countif - issue (no duplicates)

    Hello

    Can someone tell me what im doing wrong with this?

    =IF(ROWS($52:52)>COUNTIF(Data!$CX$12:$CX$75,Calculations!$E$51),"",INDEX(Data!$CW$12:$CW$75,SMALL(INDEX(ROW(Data!$CX$12:$CX$75)+(Data!$CX$12:$CX$75<>Calculations!$E$51)*10^10,0),ROWS($52:52))))

    there should be a total of 13 entries.

    so after 13 entries, the formula should give a zero result.....but this appears to not be happening, any ideas why?

    basically, this lets me not get any duplicate values from the list taht i have. thx you so much!
    Last edited by step_one; 07-14-2011 at 05:16 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: countif - issue (no duplicates)

    Are you confirming with CTRL+SHIFT+ENTER and then copied down?

    If yes and still an issue, can you post sample spreadsheet?
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor
    Join Date
    04-27-2011
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    113

    Re: countif - issue (no duplicates)

    hello NBVC

    appreciate the help.

    i have attached a sample workbook (see highlight in yellow).

    basically, if someone adds another city in the "Data" worksheet range E12:E75, i would like a formula to capture that?

    pls see highlight in red where i have tried the "array" approach but still getting repeats.

    your thoughts? thx you!
    Attached Files Attached Files

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: countif - issue (no duplicates)

    Try this formula in U52 copied down

    =LOOKUP("zzz",IF({1,0},"",INDEX(Data!$CW$12:$CW$75,MATCH(1,INDEX(ISNA(MATCH( Data!$CW$12:$CW$75,U$51:U51,0))*(Data!$CX$12:$CX$75=E$51),0),0))))

    it doesn't need "array entering"....
    Audere est facere

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: countif - issue (no duplicates)

    Try:

    =LOOKUP(REPT("z",255),CHOOSE({1,2},"",INDEX(Data!$CW$12:$CW$76,MATCH(0, INDEX(COUNTIF(Calculations!C$51:C51,Data!$CW$12:$CW$75),0),0))))

    confirmed with just ENTER and copied down.

  6. #6
    Forum Contributor
    Join Date
    04-27-2011
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    113

    Re: countif - issue (no duplicates)

    Quote Originally Posted by daddylonglegs View Post
    Try this formula in U52 copied down

    =LOOKUP("zzz",IF({1,0},"",INDEX(Data!$CW$12:$CW$75,MATCH(1,INDEX(ISNA(MATCH( Data!$CW$12:$CW$75,U$51:U51,0))*(Data!$CX$12:$CX$75=E$51),0),0))))

    it doesn't need "array entering"....
    thx you so much, works like a charm!

  7. #7
    Forum Contributor
    Join Date
    04-27-2011
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    113

    Re: countif - issue (no duplicates)

    Quote Originally Posted by NBVC View Post
    Try:

    =LOOKUP(REPT("z",255),CHOOSE({1,2},"",INDEX(Data!$CW$12:$CW$76,MATCH(0, INDEX(COUNTIF(Calculations!C$51:C51,Data!$CW$12:$CW$75),0),0))))

    confirmed with just ENTER and copied down.

    for some odd reason, it was giving me doubles? but i really appreciate the help, u guys are the best!

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: countif - issue (no duplicates)

    For me, my formula gave the exact same results as daddylonglegs' formula...

+ 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