+ Reply to Thread
Results 1 to 8 of 8

Formula Help: Countif or Sumproduct

  1. #1
    Registered User
    Join Date
    10-21-2011
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    4

    Question Formula Help: Countif or Sumproduct

    I am trying to create a formula not a pivot table of data.
    Example data below: First,I am trying to figure out how many "makes" enrolled during every month.(January, February, March....etc) Then from there how many placed orders during their enrollment month.

    Make Enrollment Date Order Placed
    Cadillac 04/04/2011 04/14/2011
    Chevrolet 04/05/2011 04/28/2011
    Chrysler 04/08/2011 04/28/2011
    Ford 04/04/2011 05/02/2011
    Honda 04/07/2011 05/03/2011


    I have so far for the month of January =SUMPRODUCT(--(MONTH($A$2:$A$5)=1))
    And I get the correct number of "makes" enrolled, but how do you figure out if they enrolled in January how many "makes" placed orders during their enrollment month. The order date might not be in the same month as of enrollment month (example if enrolled in January, they might not have placed their order until October)

    Please help

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

    Re: Formula Help: Countif or Sumproduct

    So are you looking for unique makes per month? (i.e. could there be multiple makes and you only want to count each make once per month)
    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-21-2011
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Formula Help: Countif or Sumproduct

    Quote Originally Posted by NBVC View Post
    So are you looking for unique makes per month? (i.e. could there be multiple makes and you only want to count each make once per month)
    It would be counted in one cell as enroll during certain month then the next cell it will be how many orders were placed during the enrollment month. So it would be counted for enrollment month once and if they placed an order it will also be count as an order placed once.

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

    Re: Formula Help: Countif or Sumproduct

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!

  5. #5
    Registered User
    Join Date
    10-21-2011
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Formula Help: Countif or Sumproduct

    Type of Car Production Date Order Placed
    Chrysler 6 1/2/2011 6/8/2011
    Honda 2 02/18/2011 07/07/2011
    Toyota 5 03/09/2011 04/20/2011
    Ford 4 04/18/2011 07/07/2011
    Honda 3 05/18/2011 08/07/2011
    Honda 10 09/18/2011 11/11/2011
    Ford 3 10/18/2011
    GM 4 10/18/2011 10/25/2011
    Honda 1 10/18/2011 11/07/2011
    Honda 5 10/18/2011 11/07/2011
    Kia 3 10/18/2011 11/07/2011
    Kia 2 9/18/201 10/20/2011


    Type of car column will have all be different data.
    I am pulling the information using the production date.
    But I need to know what type of car placed an order, but using the production date. (Using the month the production was completed, not the actual order date)
    Example:
    Month Orders Placed - Formula is needed to find how many orders placed during the production month.
    January 1
    February 1
    March
    April 1
    May 1
    June 0
    July 0
    August 0
    September 2
    October 4
    November 0
    December 0

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

    Re: Formula Help: Countif or Sumproduct

    if data is in A2:C13

    and the months are listed in F2 down...

    =COUNTIFS($C$2:$C$13,">="&DATE(2011,ROWS($C$2:$C2),1),$C$2:$C$13,"<="&DATE(2011,ROWS($C$2:$C2)+1,1)-1)

    copied down

  7. #7
    Registered User
    Join Date
    10-21-2011
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Formula Help: Countif or Sumproduct

    What do you mean by the months are listed in f2 down - I need to know how many orders were placed, by the production date. I can't seem to get this formula to work explain please.
    Quote Originally Posted by NBVC View Post
    if data is in A2:C13

    and the months are listed in F2 down...

    =COUNTIFS($C$2:$C$13,">="&DATE(2011,ROWS($C$2:$C2),1),$C$2:$C$13,"<="&DATE(2011,ROWS($C$2:$C2)+1,1)-1)

    copied down

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

    Re: Formula Help: Countif or Sumproduct

    That part doesn't matter as the ROWS() function takes care of the month number....

    I assumed the sample data you gave above is in A2:C13... so that this formula would work if that were the case... you need to adjust the $C$2:$C$13 to suit the column of Dates you want to count.

+ 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