Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Jun 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Count(if array won't work, but sum(if will (2000/SR-1)

    Hi! I've been trying to perform an counting array function. Ultimately I wanted to count lines that had a yes (Y) answer in two separate columns. I aimed to say: =COUNT(IF((e2:e4431="Y")*(f2:f4431="Y"),b2:b4431)) . But it would return a 0 or 1, which I knew to be a wrong answer. I've had the same problem with other =COUNT(IF(...) arrays. <img src=/S/headthrob.gif border=0 alt=headthrob width=15 height=15>

    Currently, I am using a work-around. Because the =SUM(IF(...) array was working, I inserted a new Column A, in which every cell contains the number 1. Then I used the array =SUM(IF((F2:F4431="Y")*(G2:G4431="Y"),A2:A4431)). Because of the new column, Column E became Column F and Column F became Column G. The sum array works, but I would really like to know what I'm doing wrong with the counting arrays. I like arrays because they minimize the need to create columns. If anyone knows where I've gone astray, please comment. Thanks!

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Count(if array won't work, but sum(if will (2000/SR-1)

    if you just want to count the number of rows that have a Y in both column E and column F, you can use a simpler formula:

    =SUM((E2:E4431="Y")*(F2:F4431="Y"))

    entered as an array formula (confirm with Shift+Ctrl+Enter).

    If you wanted something else, please post.

  3. #3
    New Lounger
    Join Date
    Jun 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Count(if array won't work, but sum(if will (2000/SR-1)

    Thank you! It works, and it doesn't require an extra column. Now I can get back to it! <img src=/S/compute.gif border=0 alt=compute width=40 height=20>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •