+ Reply to Thread
Results 1 to 5 of 5

count no. different values depending on another value

  1. #1
    Registered User
    Join Date
    09-18-2012
    Location
    Aberdeen
    MS-Off Ver
    Excel 2007
    Posts
    3

    count no. different values depending on another value

    Hi,

    I am trying to work out a way of counting the number of times a value occurs depending on another value. For example I want to know the number of fathers in a nest but I don't care about the number of times their ID occurs. See below:

    FatherID nest
    *1 22
    *1 22
    *2 22
    *1 22
    *3 22
    *1 22
    *1 22
    *1 22
    *1 22
    *1 22
    *1 22
    *1 22
    *1 22
    *1 22
    *1 22
    *4 59
    *5 59
    *4 59
    *4 59
    *5 59
    *4 59
    *4 59
    *5 59
    *6 59
    *5 59
    *7 83
    *8 83
    *9 83
    *7 83
    *8 83
    *7 83


    So within nest 22 there are 3 fathers and within nest 59 there are 3 fathers and same for nest 83.

    Many Thanks,

    Rosey

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: count no. different values depending on another value

    Take a look at Pivot Tables
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Registered User
    Join Date
    09-18-2012
    Location
    Aberdeen
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: count no. different values depending on another value

    Hi,

    I am currently using a pivot table which will give me a list of the number of fathers per nest but I have a very large data set so it is very time consuming to go through the list and effectively count the number manually.

    What I would like is two columns: 'nest number' and 'number of fathers'.

    I can get the number of each father ID but not the number of different fathers per nest.

    Thanks for your post

  4. #4
    Registered User
    Join Date
    09-29-2011
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: count no. different values depending on another value

    Once you have the data in a Pivot Table you can use the COUNIFS or SUMIFS formula to calculate the total based on whatver criteria you care to apply.

  5. #5
    Registered User
    Join Date
    09-18-2012
    Location
    Aberdeen
    MS-Off Ver
    Excel 2007
    Posts
    3

    Smile Re: count no. different values depending on another value

    Thank you!!!

    That's very helpful!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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