+ Reply to Thread
Results 1 to 18 of 18

count and index issue

  1. #1
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,233

    count and index issue

    hello

    having some issues with my formula...i am running a contest and my data is not being captured correctly.

    in sheet "CSA Details breakdown" the person input their data (ie. name column D and revenue column L). however, in cell P16 (highlighted red), the row does not activate.

    the reason why i need it to show data is b/c the payout in the "rps conest payout" sheet, should show in cell D40 for P10 the person's name and deal.

    the issue seems to be in the person name. I use "john doe" in the "csa detail" worksheet, however if i change in cell D16 to "j. doe"...for formula picks it up

    formula in P16:
    =IF(G16='RPS Contest Payout'!$D$37,IF(COUNTIF($D$14:D16,D16)=1,ROW(),""),"")


    can someone pls help as it's causing a major issue, pls and thx u
    Attached Files Attached Files
    Last edited by jw01; 10-04-2012 at 09:29 AM.

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

    Re: count and index issue

    here: COUNTIF($D$14:D16,D16)=1 you are saying if the Count from D14 to D16 of value in D16 is 1 then submit Row number... there are 3 John Doe's so it will not equal 1 and therefore it will return the FALSE part (i.e. Null). When you change D16 to J. Doe, then your count of J.Doe is 1 and so you get Row number returned...
    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 Dave H9's Avatar
    Join Date
    03-10-2011
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    418

    Re: count and index issue

    This part - COUNTIF($D$14:D16,D16)=1 - is counting the number of times "John Doe" appears in range D14:D16, it appears 3 times (which doesn't equal 1) hence the result is "".

    Dave H
    - Mark your post [SOLVED] if it has been answered satisfactorily, by editing your original post using advanced mode.
    - Thank those that provided useful help, its nice and its very well appreciated...use the star on the lower left of the post

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: count and index issue

    ..Maybe to try this and copy down?
    Please Login or Register  to view this content.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  5. #5
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,233

    Re: count and index issue

    Hello Fotis

    Thxs for the input however, when i used your formula

    =IF(G14='RPS Contest Payout'!$D$37,IF(COUNTIF($D14:D14,D14)=1,ROW(),""),"")

    it does function how i want, however...in the "rps contest payout" sheet, it shows the name multiple times, instead of just once...any thoughts? thxs alot.

  6. #6
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,233

    Re: count and index issue

    Quote Originally Posted by NBVC View Post
    here: COUNTIF($D$14:D16,D16)=1 you are saying if the Count from D14 to D16 of value in D16 is 1 then submit Row number... there are 3 John Doe's so it will not equal 1 and therefore it will return the FALSE part (i.e. Null). When you change D16 to J. Doe, then your count of J.Doe is 1 and so you get Row number returned...
    any suggestions how i can avoid that....yet at the same time on my "rps contest payout" sheet, have the name only appear once? thxs for your input.

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

    Re: count and index issue

    can you use:

    COUNTIF($D$14:D16,D16)>=1

  8. #8
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: count and index issue

    If I assume that you count the occurences of a name to check whether it is unique and if I assume that they should also be unique within a period then you should involve the period in the countif.
    In that case you could try to alter the formula in P16 to something like:
    Please Login or Register  to view this content.
    Can be coded shorter, but (given my assumptions) should/could do the trick.
    Cheers!
    Tsjallie




    --------
    If your problem is solved, pls mark the thread SOLVED (see Thread Tools in the menu above). Thank you!

    If you think design is an expensive waste of time, try doing without ...

  9. #9
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,233

    Re: count and index issue

    i used the formula

    however it appears is now in the "rps contest payout" sheet

    cell D19
    =IF(ROWS($A$1:A1)>COUNT('CSA detail breakdown'!$O$14:$O$1020),"",INDEX('CSA detail breakdown'!$D$14:$D$1020,MATCH(SMALL('CSA detail breakdown'!$O$14:$O$1020,ROWS($A$1:A1)),'CSA detail breakdown'!$O$14:$O$1020,0)))

    it is listing the names twice

    i have attached a sample update

    any way to work around this? thx u
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,233

    Re: count and index issue

    Quote Originally Posted by NBVC View Post
    can you use:

    COUNTIF($D$14:D16,D16)>=1
    hello nbvc

    i tried your approach

    however it appears the issue is also in the "rps contest payout" sheet

    cell D19
    =IF(ROWS($A$1:A1)>COUNT('CSA detail breakdown'!$O$14:$O$1020),"",INDEX('CSA detail breakdown'!$D$14:$D$1020,MATCH(SMALL('CSA detail breakdown'!$O$14:$O$1020,ROWS($A$1:A1)),'CSA detail breakdown'!$O$14:$O$1020,0)))

    any thoughts on this? thxs again for your great help.

  11. #11
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,233

    Re: count and index issue

    any help on this guys ? pls and thx u

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

    Re: count and index issue

    Maybe you need COUNTIFS to include the Period Sold in the count...

    For P9:

    =IF(G14='RPS Contest Payout'!$D$16,IF(COUNTIFS($D$14:D14,D14,$G$14:G14,G14)=1,ROW(),""),"")

    copied down

  13. #13
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,233

    Re: count and index issue

    hello NBVC

    i tried your approach.

    in the "rps payout" worksheet, in cell D40 for P10, the name does not appear - see attached

    =IF(ROWS($A$1:A1)>COUNT('CSA detail breakdown'!$P$14:$P$1020),"",INDEX('CSA detail breakdown'!$D$14:$D$1020,MATCH(SMALL('CSA detail breakdown'!$P$14:$P$1020,ROWS($A$1:A1)),'CSA detail breakdown'!$P$14:$P$1020,0)))


    also, this is the formula i have in cell P14 copied down for P10 in the "csa detail" worksheet

    =IF(G14='RPS Contest Payout'!$D$36,IF(COUNTIFS($D$14:D14,D14,$G$14:G14,G14)=1,ROW(),""),"")

    thxs
    Attached Files Attached Files

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

    Re: count and index issue

    P14 should be:

    =IF(G14='RPS Contest Payout'!$D$37,IF(COUNTIFS($D$14:D14,D14,$G$14:G14,G14)=1,ROW(),""),"")

    you were referencing $D$36... which is blank

  15. #15
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,233

    Re: count and index issue

    omg thx u so, so much!

    just real quick....if users have 2007excel, is there a way around countifs?

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

    Re: count and index issue

    COUNTIFS($D$14:D14,D14,$G$14:G14,G14)=1

    becomes

    SUMPRODUCT(($D$14:D14=D14)*($G$14:G14=G14))=1

  17. #17
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,233

    Re: count and index issue

    thx u so much sir!

  18. #18
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: count and index issue

    jw01 - if i understand you correctly, then:

    XL2003 = SUMPRODUCT
    XL2007 = COUNTIFS
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

+ 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