+ Reply to Thread
Results 1 to 7 of 7

Countif, Sumproduct and WeekNum

  1. #1
    Registered User
    Join Date
    08-04-2009
    Location
    Tel Aviv
    MS-Off Ver
    Excel 2003
    Posts
    7

    Countif, Sumproduct and WeekNum

    Hey there

    This is my first post so forgive me if I break too many forum rules. I tried searching everywhere for a solution but to no avail. Perhaps you can help?

    I have a table that has 3 columns:
    Product name (one of 15 products I have)
    Purchase Date (converted to excel datevalue).
    Week number (a number between 1 and 52)

    I'm trying to figure out how to sum the products purchased in a given week.

    Help anyone?
    Last edited by theproblem; 08-04-2009 at 04:37 PM.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Countif, Sumproduct and WeekNum

    Do you mean you're trying to count the number of products purchased in a given week? I don't see any columns that would have data you could sum.

    If so, assuming "Product Name" is column A, "Purchase Date" is column B and "Week Number" is column C, try:

    =COUNTIF(C:C,45)

    This will count all of the entries in column C that have a value of 45. If you're trying to sum another column, let's say column D has number purchased on that date, you could use SUMIF like so:

    =SUMIF(C:C,45,D:D)

  3. #3
    Registered User
    Join Date
    08-04-2009
    Location
    Tel Aviv
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Countif, Sumproduct and WeekNum

    I think I may have failed to explain myself properly.
    I've attached a file that shows the data.

    In the table above I've written how I'd like to view the data.
    In the table below is the data as I have it.

    Basically the report has "weeks" for columns and "products" for rows.
    In each row it would say how many times the each product mentioned in a given week.

    Hope this helps you helps me.

    Thank you!
    Attached Files Attached Files

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Countif, Sumproduct and WeekNum

    In your example spreadsheet, cell B3, enter the following formula:

    =SUMPRODUCT(--($B$10:$B$18=$A3),--($C$10:$C$18=B$2))

    You can then copy that down and across to fill your values.

  5. #5
    Registered User
    Join Date
    08-04-2009
    Location
    Tel Aviv
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Countif, Sumproduct and WeekNum

    Well, it works in the test worksheet, but doesn't work in my original...
    I'm getting a VALUE error for some hellish reason...


    Weird.

    Thanks anyway.

  6. #6
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Countif, Sumproduct and WeekNum

    Try providing an example worksheet with your REAL layout. You can use fake data, but the formulas depend on the layout, of course.

  7. #7
    Registered User
    Join Date
    08-04-2009
    Location
    Tel Aviv
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Countif, Sumproduct and WeekNum

    Thanks, now I have a whole different problem - bloody week 53 ruins everything. :-)

+ 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