+ Reply to Thread
Results 1 to 4 of 4

Formula to count TWO conditions are met

  1. #1
    IoHeFy
    Guest

    Formula to count TWO conditions are met

    I am relatively new to formulas with Excel. I have used 'COUNTIF' to count
    how often a coloumn contains a certain line of text. However I want a formula
    which will do the following (with a made up example);
    Coloumn A is a pick-list of names - e.g. A Nother, J Bloggs etc
    Coloumn B is a pick-list of queries - e.g. Late for Work, Sickness Day etc
    I need to create a formula that would count how often the combination of 'A
    Nother' & 'Sickness Day' was used, and another for how often the combination
    of 'Joe Bloggs' and 'Late for work' was also used. This is for use in a table
    & chart.

    Many thanks.

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

    =SUMPRODUCT(--(A1:A10="A Nother"),--(B1:B10="Sickness Day"))

  3. #3
    Sloth
    Guest

    RE: Formula to count TWO conditions are met

    =SUMPRODUCT(--(A1:A100="A Nother");--(B1:B100="Sickness Day")

    =SUMPRODUCT(--(A1:A100="Joe Bloggs");--(B1:B100="Late for work")

    should work for you. You'll find SUMPRODUCT used a lot for this type of
    conditional counting and summing.

    "IoHeFy" wrote:

    > I am relatively new to formulas with Excel. I have used 'COUNTIF' to count
    > how often a coloumn contains a certain line of text. However I want a formula
    > which will do the following (with a made up example);
    > Coloumn A is a pick-list of names - e.g. A Nother, J Bloggs etc
    > Coloumn B is a pick-list of queries - e.g. Late for Work, Sickness Day etc
    > I need to create a formula that would count how often the combination of 'A
    > Nother' & 'Sickness Day' was used, and another for how often the combination
    > of 'Joe Bloggs' and 'Late for work' was also used. This is for use in a table
    > & chart.
    >
    > Many thanks.


  4. #4
    Toppers
    Guest

    RE: Formula to count TWO conditions are met

    =SUMPRODUCT(--(A1:A100="A Nother"),--(B1:B100="Sickness day"))

    =SUMPRODUCT(--(A1:A100="Joe Bloggs"),--(B1:B100="Late for work"))

    You can replace literals with cells containing your values. Note SUMPRODUCT
    cannot use whole columns i.e A:A is not allowed.

    HTH

    "IoHeFy" wrote:

    > I am relatively new to formulas with Excel. I have used 'COUNTIF' to count
    > how often a coloumn contains a certain line of text. However I want a formula
    > which will do the following (with a made up example);
    > Coloumn A is a pick-list of names - e.g. A Nother, J Bloggs etc
    > Coloumn B is a pick-list of queries - e.g. Late for Work, Sickness Day etc
    > I need to create a formula that would count how often the combination of 'A
    > Nother' & 'Sickness Day' was used, and another for how often the combination
    > of 'Joe Bloggs' and 'Late for work' was also used. This is for use in a table
    > & chart.
    >
    > Many thanks.


+ 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