+ Reply to Thread
Results 1 to 6 of 6

Identify number of items with characterisitics from two columns

  1. #1

    Identify number of items with characterisitics from two columns

    I have two columns, one with dog color and the other with eye color. I
    am trying to identify the number of grey dogs that have blue eyes. Dog
    color is in one column, eye color is another. I'd be very grateful for
    any help....just a PhD student trying to finish my dissertation.
    thanks, judy
    p.s. the specifics are made up but the problem has caused me an hour
    and a half of frustration.


  2. #2
    paul
    Guest

    RE: Identify number of items with characterisitics from two columns

    sumproduct will do it for you
    http://www.xldynamic.com/source/xld.SUMPRODUCT.html
    --
    paul
    remove nospam for email addy!



    "[email protected]" wrote:

    > I have two columns, one with dog color and the other with eye color. I
    > am trying to identify the number of grey dogs that have blue eyes. Dog
    > color is in one column, eye color is another. I'd be very grateful for
    > any help....just a PhD student trying to finish my dissertation.
    > thanks, judy
    > p.s. the specifics are made up but the problem has caused me an hour
    > and a half of frustration.
    >
    >


  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,475

    Sum if - two criteria

    =SUM(IF((A1:A8=C1)*(B1:B8=D1),1,0))

    "I am trying to identify the number of grey dogs that have blue eyes. "

    this is an array formula so you need to
    ctrl shift enter to get it to work

    this example has the color of dogs in range A1:A8 and eye color in range B1:B8
    C1 you can type in the dog color and D1 you can type in the eye color that you want to add up

    Place the above formula in E1, don't forget to ctrl shift enter

  4. #4
    JudithJubilee
    Guest

    RE: Identify number of items with characterisitics from two columns

    Hello,

    If you have your dog colour in A and your eye colour in B:

    =SUMPRODUCT(--(A1:A100="Grey"),--(B1:B100="Blue"))

    If you need more of the same it would be easier if you designated a cell for
    each, ie. D1 for Dog Colour and E1 for Eye Colour you could have the
    following:

    =SUMPRODUCT(--(A1:A100=$D$1),--(B1:B100=$E$1))

    You can then just type your new criteria in the D and E

    Judith
    --
    Hope this helps


    "[email protected]" wrote:

    > I have two columns, one with dog color and the other with eye color. I
    > am trying to identify the number of grey dogs that have blue eyes. Dog
    > color is in one column, eye color is another. I'd be very grateful for
    > any help....just a PhD student trying to finish my dissertation.
    > thanks, judy
    > p.s. the specifics are made up but the problem has caused me an hour
    > and a half of frustration.
    >
    >


  5. #5
    L. Howard Kittle
    Guest

    Re: Identify number of items with characterisitics from two columns

    Try:

    =SUM(IF(A1:A6=D1,IF(B1:B6=E1,1,0),0))

    Where your list is in A & B
    Where D1 is the color of the dog
    Where E1 is the eye color

    Use CTRL + SHIFT + ENTER to enter.

    HTH
    Regards,
    Howard

    <[email protected]> wrote in message
    news:[email protected]...
    >I have two columns, one with dog color and the other with eye color. I
    > am trying to identify the number of grey dogs that have blue eyes. Dog
    > color is in one column, eye color is another. I'd be very grateful for
    > any help....just a PhD student trying to finish my dissertation.
    > thanks, judy
    > p.s. the specifics are made up but the problem has caused me an hour
    > and a half of frustration.
    >




  6. #6
    Pete_UK
    Guest

    Re: Identify number of items with characterisitics from two columns

    As an alternative if you want to do other comparisons, you might
    consider using autofilters. You could filter for dog colour in one
    column and for eye colour in another and this formula would give you a
    count of the visible rows:

    =SUBTOTAL(3,A3:A5000)

    You could insert a new row at the very top of your spreadsheet and put
    this formula there, so that it is always visible when you apply the
    filters. I am assuming that you have a header row (which would become
    row 2), so that your data begins in row 3. Adjust the range to suit.
    Choosing other filters would allow you to record other counts.

    Hope this helps.

    Pete


+ 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