+ Reply to Thread
Results 1 to 9 of 9

how to use sumproduct count a date range & exclude 7 different words from the range

  1. #1
    Registered User
    Join Date
    05-12-2012
    Location
    Austin, TX
    MS-Off Ver
    Excel 2003
    Posts
    17

    how to use sumproduct count a date range & exclude 7 different words from the range

    **I have dates in column A
    **I have initials in column B

    I want to count all items in the date range 4/30/12 - 5/4/12 in column A that do not have initials, (TM,TD,GM,DV,RR,MR,AC) in column B. I can do a date range, and I can exclude initials using sumproduct, but I dont know how to combine the two. Any help is greatly appreciated.

    Thanks!!

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: how to use sumproduct count a date range & exclude 7 different words from the range

    I reckon
    =sumproduct((a1:a100>=date(2012,4,30))*(a1:a100< =date(2012,5,4))*(b1:b100<>{"TM","TD","GM","DV","RR","MR","AC"}))
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    05-12-2012
    Location
    Austin, TX
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: how to use sumproduct count a date range & exclude 7 different words from the range

    I should also say that I am working with excel 2003.

    Hi JosephP,

    Thank you for your quick response :-). Excel said the formula contained an error. Excel sugggested that I fix the error like this:
    =SUMPRODUCT((A1:A100>=DATE(2012,4,30))*(A1:A100<DATE(2012,5,4))*(B1:B20{TM","TD","GM","DV","RR","MR","AC"}))


    However, the answer it is coming up with is 0, and the answer should be 13.

    Any ideas?
    Last edited by td3601; 05-14-2012 at 01:19 PM. Reason: grammar

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: how to use sumproduct count a date range & exclude 7 different words from the range

    can you post a workbook-the forum seems to be changing the formulas posted as yours is invalid syntax

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

    Re: how to use sumproduct count a date range & exclude 7 different words from the range

    Try:

    =SUMPRODUCT((A2:A100>=DATE(2012,4,30))*(A2:A100<DATE(2012,5,4))*(ISNA(MATCH(B2:B100,{"TM","TD","GM","DV","RR","MR","AC"},0))))

    Note: Make sure not to include column headers or text in the Date column or you will get #VALUE! error.
    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.

  6. #6
    Registered User
    Join Date
    05-12-2012
    Location
    Austin, TX
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: how to use sumproduct count a date range & exclude 7 different words from the range

    Opps! User error, it did work!! Yay! thanks!

  7. #7
    Registered User
    Join Date
    05-12-2012
    Location
    Austin, TX
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: how to use sumproduct count a date range & exclude 7 different words from the range

    Thanks for the 2nd way :-) And definitely thanks for the tip on not including column headers with the date range. I did not know that. I am very new to using these formulas. I appreciate your help!
    Last edited by td3601; 05-14-2012 at 01:27 PM. Reason: grammar

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

    Re: how to use sumproduct count a date range & exclude 7 different words from the range

    Sorry, I was a little misleading.. if you had included a column to sum up, then the data shouldn't include the headers...or you will get the errors....
    Last edited by NBVC; 05-14-2012 at 01:33 PM.

  9. #9
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: how to use sumproduct count a date range & exclude 7 different words from the range

    if you use the comma syntax instead of multiplication for the data range (assuming you can), then text values won't be a problem

+ 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