+ Reply to Thread
Results 1 to 7 of 7

Count - multiple criteria, multiple sheets, and date range.

  1. #1
    Registered User
    Join Date
    06-13-2011
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    4

    Count - multiple criteria, multiple sheets, and date range.

    Fabulous site - am a huge novice in Excel and am desperate for urgent help ,so hope someone can assist.

    I'm struggling with creating a report in 2003, and have attached a simplified example.

    My date ranges are on sheet DATA SHEET, along with data validation lists, and holidays to use alongside NETWORKDAYS.

    Can anyone suggest something for the following two examples and I hope to be able to work the rest out from there:

    1) Count number of occurances over sheets 'Type A' and 'Type B' where C:C>='DATA SHEET'!A3 and C:C<='DATA SHEET'!B3 and B:B='1'.

    The below worked for me on the first week, but gave a minus number for the second week:

    =(SUMPRODUCT(('Type A'!$C$2:$C$3000>='DATA SHEET'!$A3)*('Type A'!$C$2:$C$3000<='DATA SHEET'!$B3)*('Type A'!$B$2:$B$3000-1)))+(SUMPRODUCT(('Type B'!$C$2:$C$3000>='DATA SHEET'!$A3)*('Type B'!$C$2:$C$3000<='DATA SHEET'!$B3)*('Type B'!$B$2:$B$3000-1)))

    2) Count number of occurances over sheets 'Type A' and 'Type B' where D:D>='DATA SHEET'!A3 and D:D<='DATA SHEET'!B3 and B:B='1' and E:E=<5

    2010 is much easier to use - I've tried lots of different ways in 2003 now and keep getting negatives, errors, or multiplied rather than counted results.

    Please help!

    Many thanks,
    A very, very noobie.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    06-13-2011
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Count - multiple criteria, multiple sheets, and date range.

    Equally, if this isn't possible, could someone let me know. Still struggling with it :o(

    Many thanks.

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Count - multiple criteria, multiple sheets, and date range.

    In the formula above you have condition:

    ('Type A'!$B$2:$B$3000-1) and ('Type B'!$B$2:$B$3000-1)

    should it be: ('Type A'!$B$2:$B$3000=1) and ('Type B'!$B$2:$B$3000=1)
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Registered User
    Join Date
    06-13-2011
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Count - multiple criteria, multiple sheets, and date range.

    Thanks NBVC. -1 was a last ditch attempt. I've tried it and --1, =1, all with quotes and without. None have worked.

    Been playing around with all sorts but I think I'm missing something fundamental.... but I've note the foggiest what.

    Thanks though!

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Count - multiple criteria, multiple sheets, and date range.

    Are you looking in the right column the Type A and Type B sheets for the Date Processed... i.e. should you be looking in column D instead of C?

    =(SUMPRODUCT(('Type A'!$C$2:$C$3000>='DATA SHEET'!$A3)*('Type A'!$D$2:$D$3000<='DATA SHEET'!$B3)*('Type A'!$B$2:$B$3000=1)))+(SUMPRODUCT(('Type B'!$C$2:$C$3000>='DATA SHEET'!$A3)*('Type B'!$D$2:$D$3000<='DATA SHEET'!$B3)*('Type B'!$B$2:$B$3000=1)))

    I get result of 2 with that formula..

  6. #6
    Registered User
    Join Date
    06-13-2011
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Count - multiple criteria, multiple sheets, and date range.

    Thanks NBVC. Not quite it though I'm afraid.

    I'll need to do the same calculation separately for both 'Date received' and 'Date Processed'.

    In the attached example the Priority 1 'Date Received' for Week 1 date range should be a result of 4 i.e. 2 x 'Type A' Priority 1, plus 2 x 'Type B' Priority 1 received in specified date range.

    But for 'Date Processed' the result is 2 i.e. 1 x Type Priority 1 processed, plus 1 x 'Type B' Priority 1 for same period.

    Thanks so much for the help - I really need to get this done asap, and it seems like it should be so simple that I'm losing the will!

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Count - multiple criteria, multiple sheets, and date range.

    Today seems to be a day of going in circles...

    To get those results your original setup, with the =1 instead of -1 works..

    i.e.

    =(SUMPRODUCT(('Type A'!$C$2:$C$3000>='DATA SHEET'!$A3)*('Type A'!$C$2:$C$3000<='DATA SHEET'!$B3)*('Type A'!$B$2:$B$3000=1)))+(SUMPRODUCT(('Type B'!C$2:C$3000>='DATA SHEET'!$A3)*('Type B'!$C$2:$C$3000<='DATA SHEET'!$B3)*('Type B'!$B$2:$B$3000=1)))

    and change the C ranges to D ranges to get 2.

    =(SUMPRODUCT(('Type A'!$D$2:$D$3000>='DATA SHEET'!$A3)*('Type A'!$D$2:$D$3000<='DATA SHEET'!$B3)*('Type A'!$B$2:$B$3000=1)))+(SUMPRODUCT(('Type B'!$D$2:$D$3000>='DATA SHEET'!$A3)*('Type B'!$D$2:$D$3000<='DATA SHEET'!$B3)*('Type B'!$B$2:$B$3000=1)))

+ 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