+ Reply to Thread
Results 1 to 8 of 8

counting problem

  1. #1
    Registered User
    Join Date
    08-16-2011
    Location
    glasgow
    MS-Off Ver
    Excel 2003
    Posts
    9

    counting problem

    hi

    i am trying to get a function that will count if a number out of a row of 10 different numbers has appeared in a range of numbers in a different part of the sheet

    regards

    Michael
    Last edited by NBVC; 08-17-2011 at 07:44 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: counting problem

    Can you give an example or 2 of what you mean?
    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
    Registered User
    Join Date
    08-16-2011
    Location
    glasgow
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: counting problem

    sorry that would help

    i have added the file

    basically i want to know if a number has appeared in the range shaded yellow has also appeared in the row so if i had the numbers 1 to 10 in my row and the numbers 1 to 7 had came out in the yellow range then it would return the number 7
    Attached Files Attached Files

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

    Re: counting problem

    I am not sure I understand that statement... can you try again?

  5. #5
    Registered User
    Join Date
    08-16-2011
    Location
    glasgow
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: counting problem

    sorry i am not being very clear....

    if you look at the sheet i attached you will see that in the first row three of the cells are coloured green, i have a fancy bit of code in the back of the conditional formatting that; as soon as a number is put in the rows below (highlighted yellow) if the number appears in the main rows numbered 1 to 31 then it shades it green, what i would like is a total of these at the end of the row so in the first rows instance as there is three coloured green then it would return three.

    regards

    Michael

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

    Re: counting problem

    Since you have duplicates in the yellow zone, you can't use a simple countif or it will double-count....

    I have to get going now, so if nobody offers a solution then I will look at either later tonight or tomorrow....

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

    Re: counting problem

    Actually, just thought of it...

    Try:

    =COUNT(IF(COUNTIF($C$36:$H$38,C1:L1),1))

    confirmed with CTRL+SHIFT+ENTER not just ENTER and copy down.

    or even:

    =SUMPRODUCT(--(COUNTIF($C$36:$H$38,C1:L1)>0))

    confirmed with just ENTER and copied down.

  8. #8
    Registered User
    Join Date
    08-16-2011
    Location
    glasgow
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: counting problem

    the second one works perfectly, you sir are a prince among men

    many thanks

    Michael

+ 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