+ Reply to Thread
Results 1 to 5 of 5

Using array formula to total entries

  1. #1
    Registered User
    Join Date
    01-17-2008
    Posts
    10

    Using array formula to total entries

    You guys helped me the other day immensely, but I'm stuck again.

    See the attached spreadsheet:

    I'm trying to total, on the Avgs2-14 worksheet, the number of Health quotes of 2 to 14 lives from the Other worksheet. The criteria I'm using is number of lives (column h on the Other worksheet) and product (column f on the Other worksheet). I want to have a total on the Avgs2-14 page of quotes run for health with lives between 2 and 14. This formula is in C5 on the Avgs2-14 worksheet. I know how to do a DCOUNT, but I think an array formula would be much easier.

    Someone please take a look at the formula I'm using in cell C5 on the Avgs2-14 worksheet and tell me what I'm doing wrong. This is driving me insane. Thanks.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    09-07-2006
    Posts
    520
    In Avgs2-14,
    Think you could try this instead in C5:
    =SUMPRODUCT((Other!H2:H128>=2)*(Other!H2:H128<=14)*(Other!F2:F128=$B$3))
    Max
    Singapore

  3. #3
    Registered User
    Join Date
    01-17-2008
    Posts
    10
    Yep, it worked. Not sure why, but that's just one more thing to learn. Thanks!

  4. #4
    Valued Forum Contributor
    Join Date
    09-07-2006
    Posts
    520
    Quote Originally Posted by RichardL
    Yep, it worked. Not sure why, but that's just one more thing to learn. Thanks!
    Welcome.

    The multiplication of the 3 criteria ranges:
    (Other!H2:H128>=2)*(Other!H2:H128<=14)*(Other!F2:F128=$B$3)
    produces a resulting array of 1's/0's depending on whether the criteria is satisfied (1's) or not (0's), ie something like this: {0;0;1;0;1 ...}.
    Sumproduct then adds up all the 1's to give the final resulting count.

  5. #5
    Valued Forum Contributor
    Join Date
    09-07-2006
    Posts
    520
    Note that the sumproduct formula need not* be array-entered.
    Normal ENTER will do.
    *exception is if TRANSPOSE function is used within the sumproduct

+ 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