+ Reply to Thread
Results 1 to 6 of 6

Count the occurence of multiple (4 conditions). - Need urgent help

  1. #1
    CT
    Guest

    Count the occurence of multiple (4 conditions). - Need urgent help

    Hi,

    I am unable to get the correct count using the formula :

    =SUM(IF(A1:A999="
    A",IF(D1:D999="D>d",IF(F1:F999="1",IF(E1:E999="1",1,0)))))

    I am trying to get no of records with
    " A" values in Column A,
    "D>d" values in Column D,
    "1" values in Column F,
    "1" values in Column E

    and Sum all the counts- after applying the nested filters.


    Can someone help me in debugging the same?
    Will appreciate early response!

    Thanks in advance,


  2. #2
    Ragdyer
    Guest

    Re: Count the occurence of multiple (4 conditions). - Need urgent help

    Try this:

    =SUMPRODUCT((A1:A999="A")*(D1:D999="D>d")*(E1:E999=1)*(F1:F999=1))

    I made an assumption that the 1's in Column E and F were real numbers, and
    didn't need the quotes.

    If I guessed wrong, and they are text, just add the quotation marks.


    --
    HTH,

    RD

    ---------------------------------------------------------------------------
    Please keep all correspondence within the NewsGroup, so all may benefit !
    ---------------------------------------------------------------------------
    "CT" <[email protected]> wrote in message
    news:[email protected]...
    > Hi,
    >
    > I am unable to get the correct count using the formula :
    >
    > =SUM(IF(A1:A999="
    > A",IF(D1:D999="D>d",IF(F1:F999="1",IF(E1:E999="1",1,0)))))
    >
    > I am trying to get no of records with
    > " A" values in Column A,
    > "D>d" values in Column D,
    > "1" values in Column F,
    > "1" values in Column E
    >
    > and Sum all the counts- after applying the nested filters.
    >
    >
    > Can someone help me in debugging the same?
    > Will appreciate early response!
    >
    > Thanks in advance,
    >



  3. #3
    Jerry W. Lewis
    Guest

    Re: Count the occurence of multiple (4 conditions). - Need urgent help

    You would have to array enter (Ctrl-Shift-Enter) this formula for it to
    work. A simpler approach would use the fact that you can coerce TRUE
    into 1 and FALSE into 0, so that the following formula should work and
    does not require array entry:

    =SUMPRODUCT((A1:A999="A")*(D1:D999="D>d")*(F1:F999="1")*(E1:E999="1"))

    Jerry

    CT wrote:

    > Hi,
    >
    > I am unable to get the correct count using the formula :
    >
    > =SUM(IF(A1:A999="
    > A",IF(D1:D999="D>d",IF(F1:F999="1",IF(E1:E999="1",1,0)))))
    >
    > I am trying to get no of records with
    > " A" values in Column A,
    > "D>d" values in Column D,
    > "1" values in Column F,
    > "1" values in Column E
    >
    > and Sum all the counts- after applying the nested filters.
    >
    >
    > Can someone help me in debugging the same?
    > Will appreciate early response!
    >
    > Thanks in advance,
    >
    >



  4. #4
    Peo Sjoblom
    Guest

    Re: Count the occurence of multiple (4 conditions). - Need urgent help

    No need to array enter it

    --
    Regards,

    Peo Sjoblom


    "Jerry W. Lewis" <post_a_reply@no_e-mail.com> wrote in message
    news:427589AF.3050700@no_e-mail.com...
    > You would have to array enter (Ctrl-Shift-Enter) this formula for it to
    > work. A simpler approach would use the fact that you can coerce TRUE into
    > 1 and FALSE into 0, so that the following formula should work and does not
    > require array entry:
    >
    > =SUMPRODUCT((A1:A999="A")*(D1:D999="D>d")*(F1:F999="1")*(E1:E999="1"))
    >
    > Jerry
    >
    > CT wrote:
    >
    >> Hi,
    >>
    >> I am unable to get the correct count using the formula :
    >>
    >> =SUM(IF(A1:A999="
    >> A",IF(D1:D999="D>d",IF(F1:F999="1",IF(E1:E999="1",1,0)))))
    >>
    >> I am trying to get no of records with " A" values in Column A,
    >> "D>d" values in Column D,
    >> "1" values in Column F,
    >> "1" values in Column E
    >>
    >> and Sum all the counts- after applying the nested filters.
    >> Can someone help me in debugging the same? Will appreciate early
    >> response!
    >>
    >> Thanks in advance,
    >>
    >>

    >



  5. #5
    Jerry W. Lewis
    Guest

    Re: Count the occurence of multiple (4 conditions). - Need urgent help

    The OP's formula

    =SUM(IF(A1:A999="A",IF(D1:D999="D>d",IF(F1:F999="1",IF(E1:E999="1",1,0)))))

    does require array entry to work, as I tried to say. I presume lack of
    array entry is why CT could not get it to work.

    My alternative formula

    =SUMPRODUCT((A1:A999="A")*(D1:D999="D>d")*(F1:F999="1")*(E1:E999="1"))

    does not require array entry, as I did say.

    On rereading my previous reply, the object referred to by "this formula"
    in my first sentence is not clear, and should probably have read "your
    formula".

    Jerry

    Peo Sjoblom wrote:

    > No need to array enter it



  6. #6
    Peo Sjoblom
    Guest

    Re: Count the occurence of multiple (4 conditions). - Need urgent help

    I see that now, thanks for the clarification

    --
    Regards,

    Peo Sjoblom


    "Jerry W. Lewis" <post_a_reply@no_e-mail.com> wrote in message
    news:42761218.3080906@no_e-mail.com...
    > The OP's formula
    >
    > =SUM(IF(A1:A999="A",IF(D1:D999="D>d",IF(F1:F999="1",IF(E1:E999="1",1,0)))))
    >
    > does require array entry to work, as I tried to say. I presume lack of
    > array entry is why CT could not get it to work.
    >
    > My alternative formula
    >
    > =SUMPRODUCT((A1:A999="A")*(D1:D999="D>d")*(F1:F999="1")*(E1:E999="1"))
    >
    > does not require array entry, as I did say.
    >
    > On rereading my previous reply, the object referred to by "this formula"
    > in my first sentence is not clear, and should probably have read "your
    > formula".
    >
    > Jerry
    >
    > Peo Sjoblom wrote:
    >
    >> No need to array enter it

    >



+ 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