+ Reply to Thread
Results 1 to 4 of 4

Thread: Counting data based on 2 different criteria and one dynamic cell

  1. #1
    Registered User
    Join Date
    04-16-2010
    Location
    Brisbane Australia
    MS-Off Ver
    Excel 2003
    Posts
    42

    Counting data based on 2 different criteria and one dynamic cell

    Hi all

    I've attached a copy of the excel file I am currently working on.

    what I am trying to do is fill out the "Number of #'s" cells based on a date entered into L3

    so in essence

    If any cell in Column A are equal to the date specified in cell L3 then count any "5"'s under the headings Q1-Q8 and provide a total as a whole number

    Thinking a sum or sumproduct should work fine but im not quite sure why it isnt

    =SUM(A:A=L3)*(B:I="5")

    tried that and it only looks at one cell in column A,

    =SUMPRODUCT((A:A=L3)*(B:I="5"))
    looks at the whole column of A but i'm missing something as I'm getting the dreaded #NUM result

    Any help is greatly appreciated
    Attached Files Attached Files
    Last edited by reynastus; 08-10-2010 at 01:21 AM. Reason: Solved

  2. #2
    Extremely Helpful member
    Join Date
    12-23-2006
    Location
    Belgium
    MS-Off Ver
    XL2003
    Posts
    6,127

    Re: Counting data based on 2 different criteria and one dynamic cell

    Hi
    try =SUMPRODUCT(($A$4:$A$100=$L$3)*($B$4:$I$100=5)) and adjust range to suit

    Entire columns ( like A:A) are not allowed in XL2003 ( OK with XL 2007)
    Quoting entire posts clutters the forum and makes threads hard to read !

    If you are pleased with a member's answer then use the Star icon to rate it

    Click here to see forum rules

  3. #3
    Registered User
    Join Date
    04-16-2010
    Location
    Brisbane Australia
    MS-Off Ver
    Excel 2003
    Posts
    42

    Re: Counting data based on 2 different criteria and one dynamic cell

    Quote Originally Posted by arthurbr View Post
    Hi
    try =SUMPRODUCT(($A$4:$A$100=$L$3)*($B$4:$I$100=5)) and adjust range to suit

    Entire columns ( like A:A) are not allowed in XL2003 ( OK with XL 2007)

    Thanks for that it works, had me stumped because the A:A search was working ok on one of the formulas in the sheet (Cell L6's formula to be exact being a =countif(A:A,L3).)

    one other thing im trying to do with this sheet is to count the blank cells in the same range

    i'm attempting to use
    (cell L7)
    =SUMPRODUCT(--($A$4:$A$2000=$L$3)*--($B$4:$I$2000=ISBLANK)

    however this isnt working either

  4. #4
    Registered User
    Join Date
    04-16-2010
    Location
    Brisbane Australia
    MS-Off Ver
    Excel 2003
    Posts
    42

    Re: Counting data based on 2 different criteria and one dynamic cell

    =SUMPRODUCT(--($A$4:$A$2000=$L$3)*--($B$4:$I$2000=ISBLANK)

    however this isnt working either
    changed ISBLANK to "" and works now

    so end product is

    =SUMPRODUCT((--($A$4:$A$2000=$L$3)*--($B$4:$I$2000="")/8)
    and i get a number of records that were not filled out

    Thanks for the help

+ 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.2.0