+ Reply to Thread
Results 1 to 5 of 5

COUNTIF / SUMPRODUCT- multiple criteria - including date range

  1. #1
    Registered User
    Join Date
    10-10-2011
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    21

    COUNTIF / SUMPRODUCT- multiple criteria - including date range

    I would like a cell to display total sales data for a particular type of work, during a specified date range.

    e.g. Total sales for "SMW" during July 2012

    The 'Type' is column 7. The 'Job Value' is column 10. The 'Completion Date' is column 13.

    I know this might be able to be achieved with SUMPRODUCT function, but as I will be collating monthly figures for multiple periods, I would like to avoid using target cells on another part of the sheet, with the date ranges in them.

    I should mention that the cell which I would like to display this data is on another sheet to the target data.

    Any assistance greatly appreciated
    Last edited by Sph01; 08-31-2012 at 04:55 AM. Reason: query solved

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

    Re: COUNTIF / SUMPRODUCT- multiple criteria - including date range

    I am not sure what this means?

    I know this might be able to be achieved with SUMPRODUCT function, but as I will be collating monthly figures for multiple periods, I would like to avoid using target cells on another part of the sheet, with the date ranges in them.
    incidently you can use SUMIFS too, which is better

    e.g.

    =SUMIFS(Sheet2!M:M,Sheet2!G:G,A1,Sheet2!J:J,B1)

    where Sheet2 is your target sheet, and A1 and B1 contain the lookup Type and date, respectively...

    or

    =SUMIFS(Sheet2!M:M,Sheet2!G:G,A1,Sheet2!J:J,">="&B1,Sheet2!J:J,"<="&C1)


    where Sheet2 is your target sheet, and A1 and B1 and C1 contain the lookup Type and start/end dates, respectively...
    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.

  3. #3
    Registered User
    Join Date
    10-10-2011
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: COUNTIF / SUMPRODUCT- multiple criteria - including date range

    Thanks for the speedy reply.

    Quote Originally Posted by NBVC View Post
    I am not sure what this means?
    I meant that I want the formula to include the date ranges, rather than specifying them in a 'hidden' cell somewhere in the sheet - a method I have seen demonstrated elsewhere on Forums - but your solution has done this anyway.

    However, the solution seems not to have worked.

    I notice that you have referenced the range M:M at the start of the formula, but this is the column with the date in. J:J is the 'Value' column. Despite rearranging these, i still cant get it to work.

    Any further suggestions?[COLOR="Silver"]

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

    Re: COUNTIF / SUMPRODUCT- multiple criteria - including date range

    So rearranging the Ms and Js didn't do it? The summing range is first range in the SUMIFS....

  5. #5
    Registered User
    Join Date
    10-10-2011
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: COUNTIF / SUMPRODUCT- multiple criteria - including date range

    My mistake - the formula does work: I rearranged the Ms and Js, and inserted "" around the start / end date values in the formula.

    So it now reads :

    =SUMIFS('Job Sheet'!J:J,'Job Sheet'!G:G,"SMW",'Job Sheet'!M:M,">="&"01/8/2012",'Job Sheet'!M:M,"<="&"31/8/2012")

    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)

Tags for this Thread

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