+ Reply to Thread
Results 1 to 8 of 8

DCOUNT? DSUM?

Hybrid View

  1. #1
    Paul W Smith
    Guest

    DCOUNT? DSUM?

    I want a formula that will tell me how many 'Trues' I have, when Team = A
    and league = 1 etc.

    Team League ResultA
    A 1 TRUE
    B 1 TRUE
    C 1 TRUE
    A 2 TRUE
    B 2 TRUE
    C 2 FALSE
    A 3 TRUE
    B 3 TRUE
    C 3 TRUE
    A 1 TRUE
    B 1 TRUE
    C 1 FALSE
    A 2 FALSE
    B 2 FALSE
    C 2 TRUE
    A 3 FALSE
    B 3 FALSE
    C 3 FALSE



  2. #2
    Peo Sjoblom
    Guest

    Re: DCOUNT? DSUM?

    =SUMPRODUCT(--(A2:A10=1),--(B2:B10=TRUE))


    --

    Regards,

    Peo Sjoblom


    "Paul W Smith" <[email protected]> wrote in message
    news:[email protected]...
    > I want a formula that will tell me how many 'Trues' I have, when Team = A
    > and league = 1 etc.
    >
    > Team League ResultA
    > A 1 TRUE
    > B 1 TRUE
    > C 1 TRUE
    > A 2 TRUE
    > B 2 TRUE
    > C 2 FALSE
    > A 3 TRUE
    > B 3 TRUE
    > C 3 TRUE
    > A 1 TRUE
    > B 1 TRUE
    > C 1 FALSE
    > A 2 FALSE
    > B 2 FALSE
    > C 2 TRUE
    > A 3 FALSE
    > B 3 FALSE
    > C 3 FALSE
    >
    >




  3. #3
    Paul W Smith
    Guest

    Re: DCOUNT? DSUM?

    what does the -- mean?



    "Peo Sjoblom" <[email protected]> wrote in message
    news:[email protected]...
    > =SUMPRODUCT(--(A2:A10=1),--(B2:B10=TRUE))
    >
    >
    > --
    >
    > Regards,
    >
    > Peo Sjoblom
    >
    >
    > "Paul W Smith" <[email protected]> wrote in message
    > news:[email protected]...
    >> I want a formula that will tell me how many 'Trues' I have, when Team = A
    >> and league = 1 etc.
    >>
    >> Team League ResultA
    >> A 1 TRUE
    >> B 1 TRUE
    >> C 1 TRUE
    >> A 2 TRUE
    >> B 2 TRUE
    >> C 2 FALSE
    >> A 3 TRUE
    >> B 3 TRUE
    >> C 3 TRUE
    >> A 1 TRUE
    >> B 1 TRUE
    >> C 1 FALSE
    >> A 2 FALSE
    >> B 2 FALSE
    >> C 2 TRUE
    >> A 3 FALSE
    >> B 3 FALSE
    >> C 3 FALSE
    >>
    >>

    >
    >




  4. #4
    Peo Sjoblom
    Guest

    Re: DCOUNT? DSUM?


    assume you have 2 TRUE in B where A is 1 then it would look like

    =SUMPRODUCT(--({TRUE;FALSE;TRUE;FALSE;TRUE;FALSE;TRUE;FALSE;FALSE}),--({TRUE
    ;TRUE;FALSE;TRUE;TRUE;FALSE;FALSE;FALSE;FALSE}))

    Then the unary minuses would turn it into

    =SUMPRODUCT({1;0;1;0;1;0;1;0;0},{1;1;0;1;1;0;0;0;0})

    and when the arrays are multiplied it will return 2


    the unary minuses will convert TRUE FALSE to 1 or 0 thus you can use the
    built in format of SUMPRODUCT, you can use

    =SUMPRODUCT((A2:A10=1)*(B2:B10=TRUE))

    as well but if you also want to sum a range the latter formula

    =SUMPRODUCT((A2:A10=1)*(B2:B10=TRUE)*(C2:C10))

    will sum C where A is 1 and B is TRUE however if C has a text value like a
    blank from another formula ="" it will return a #VALUE! error while

    =SUMPRODUCT(--(A2:A10=1),--(B2:B10=TRUE),C2:C10)

    will ignore the text



    --

    Regards,

    Peo Sjoblom



    "Paul W Smith" <[email protected]> wrote in message
    news:[email protected]...
    > what does the -- mean?
    >
    >
    >
    > "Peo Sjoblom" <[email protected]> wrote in message
    > news:[email protected]...
    > > =SUMPRODUCT(--(A2:A10=1),--(B2:B10=TRUE))
    > >
    > >
    > > --
    > >
    > > Regards,
    > >
    > > Peo Sjoblom
    > >
    > >
    > > "Paul W Smith" <[email protected]> wrote in message
    > > news:[email protected]...
    > >> I want a formula that will tell me how many 'Trues' I have, when Team =

    A
    > >> and league = 1 etc.
    > >>
    > >> Team League ResultA
    > >> A 1 TRUE
    > >> B 1 TRUE
    > >> C 1 TRUE
    > >> A 2 TRUE
    > >> B 2 TRUE
    > >> C 2 FALSE
    > >> A 3 TRUE
    > >> B 3 TRUE
    > >> C 3 TRUE
    > >> A 1 TRUE
    > >> B 1 TRUE
    > >> C 1 FALSE
    > >> A 2 FALSE
    > >> B 2 FALSE
    > >> C 2 TRUE
    > >> A 3 FALSE
    > >> B 3 FALSE
    > >> C 3 FALSE
    > >>
    > >>

    > >
    > >

    >
    >




  5. #5
    Paul W Smith
    Guest

    Re: DCOUNT? DSUM?

    I am now guessing that -- signifies an array function.

    However you have misunderstood my issue. Have three columns of data

    Team League Result
    A 1 True
    B 1 True

    Etc.


    "Peo Sjoblom" <[email protected]> wrote in message
    news:[email protected]...
    > =SUMPRODUCT(--(A2:A10=1),--(B2:B10=TRUE))
    >
    >
    > --
    >
    > Regards,
    >
    > Peo Sjoblom
    >
    >
    > "Paul W Smith" <[email protected]> wrote in message
    > news:[email protected]...
    >> I want a formula that will tell me how many 'Trues' I have, when Team = A
    >> and league = 1 etc.
    >>
    >> Team League ResultA
    >> A 1 TRUE
    >> B 1 TRUE
    >> C 1 TRUE
    >> A 2 TRUE
    >> B 2 TRUE
    >> C 2 FALSE
    >> A 3 TRUE
    >> B 3 TRUE
    >> C 3 TRUE
    >> A 1 TRUE
    >> B 1 TRUE
    >> C 1 FALSE
    >> A 2 FALSE
    >> B 2 FALSE
    >> C 2 TRUE
    >> A 3 FALSE
    >> B 3 FALSE
    >> C 3 FALSE
    >>
    >>

    >
    >




  6. #6
    Peo Sjoblom
    Guest

    Re: DCOUNT? DSUM?

    Just add another range

    =SUMPRODUCT(--(TeamRange="A"),--(LeagueRange=1),--(ResultRange=TRUE))

    --

    Regards,

    Peo Sjoblom

    "Paul W Smith" <[email protected]> wrote in message
    news:[email protected]...
    > I am now guessing that -- signifies an array function.
    >
    > However you have misunderstood my issue. Have three columns of data
    >
    > Team League Result
    > A 1 True
    > B 1 True
    >
    > Etc.
    >
    >
    > "Peo Sjoblom" <[email protected]> wrote in message
    > news:[email protected]...
    > > =SUMPRODUCT(--(A2:A10=1),--(B2:B10=TRUE))
    > >
    > >
    > > --
    > >
    > > Regards,
    > >
    > > Peo Sjoblom
    > >
    > >
    > > "Paul W Smith" <[email protected]> wrote in message
    > > news:[email protected]...
    > >> I want a formula that will tell me how many 'Trues' I have, when Team =

    A
    > >> and league = 1 etc.
    > >>
    > >> Team League ResultA
    > >> A 1 TRUE
    > >> B 1 TRUE
    > >> C 1 TRUE
    > >> A 2 TRUE
    > >> B 2 TRUE
    > >> C 2 FALSE
    > >> A 3 TRUE
    > >> B 3 TRUE
    > >> C 3 TRUE
    > >> A 1 TRUE
    > >> B 1 TRUE
    > >> C 1 FALSE
    > >> A 2 FALSE
    > >> B 2 FALSE
    > >> C 2 TRUE
    > >> A 3 FALSE
    > >> B 3 FALSE
    > >> C 3 FALSE
    > >>
    > >>

    > >
    > >

    >
    >




  7. #7
    Bob Phillips
    Guest

    Re: DCOUNT? DSUM?

    No, it doesn't at all . See
    http://www.xldynamic.com/source/xld.SUMPRODUCT.html

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Paul W Smith" <[email protected]> wrote in message
    news:[email protected]...
    > I am now guessing that -- signifies an array function.
    >
    > However you have misunderstood my issue. Have three columns of data
    >
    > Team League Result
    > A 1 True
    > B 1 True
    >
    > Etc.
    >
    >
    > "Peo Sjoblom" <[email protected]> wrote in message
    > news:[email protected]...
    > > =SUMPRODUCT(--(A2:A10=1),--(B2:B10=TRUE))
    > >
    > >
    > > --
    > >
    > > Regards,
    > >
    > > Peo Sjoblom
    > >
    > >
    > > "Paul W Smith" <[email protected]> wrote in message
    > > news:[email protected]...
    > >> I want a formula that will tell me how many 'Trues' I have, when Team =

    A
    > >> and league = 1 etc.
    > >>
    > >> Team League ResultA
    > >> A 1 TRUE
    > >> B 1 TRUE
    > >> C 1 TRUE
    > >> A 2 TRUE
    > >> B 2 TRUE
    > >> C 2 FALSE
    > >> A 3 TRUE
    > >> B 3 TRUE
    > >> C 3 TRUE
    > >> A 1 TRUE
    > >> B 1 TRUE
    > >> C 1 FALSE
    > >> A 2 FALSE
    > >> B 2 FALSE
    > >> C 2 TRUE
    > >> A 3 FALSE
    > >> B 3 FALSE
    > >> C 3 FALSE
    > >>
    > >>

    > >
    > >

    >
    >




  8. #8
    Paul W Smith
    Guest

    Re: DCOUNT? DSUM?

    Great and very informative article - thanks.


    "Bob Phillips" <[email protected]> wrote in message
    news:[email protected]...
    > No, it doesn't at all . See
    > http://www.xldynamic.com/source/xld.SUMPRODUCT.html
    >
    > --
    >
    > HTH
    >
    > RP
    > (remove nothere from the email address if mailing direct)
    >
    >
    > "Paul W Smith" <[email protected]> wrote in message
    > news:[email protected]...
    >> I am now guessing that -- signifies an array function.
    >>
    >> However you have misunderstood my issue. Have three columns of data
    >>
    >> Team League Result
    >> A 1 True
    >> B 1 True
    >>
    >> Etc.
    >>
    >>
    >> "Peo Sjoblom" <[email protected]> wrote in message
    >> news:[email protected]...
    >> > =SUMPRODUCT(--(A2:A10=1),--(B2:B10=TRUE))
    >> >
    >> >
    >> > --
    >> >
    >> > Regards,
    >> >
    >> > Peo Sjoblom
    >> >
    >> >
    >> > "Paul W Smith" <[email protected]> wrote in message
    >> > news:[email protected]...
    >> >> I want a formula that will tell me how many 'Trues' I have, when Team
    >> >> =

    > A
    >> >> and league = 1 etc.
    >> >>
    >> >> Team League ResultA
    >> >> A 1 TRUE
    >> >> B 1 TRUE
    >> >> C 1 TRUE
    >> >> A 2 TRUE
    >> >> B 2 TRUE
    >> >> C 2 FALSE
    >> >> A 3 TRUE
    >> >> B 3 TRUE
    >> >> C 3 TRUE
    >> >> A 1 TRUE
    >> >> B 1 TRUE
    >> >> C 1 FALSE
    >> >> A 2 FALSE
    >> >> B 2 FALSE
    >> >> C 2 TRUE
    >> >> A 3 FALSE
    >> >> B 3 FALSE
    >> >> C 3 FALSE
    >> >>
    >> >>
    >> >
    >> >

    >>
    >>

    >
    >




+ 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