+ Reply to Thread
Results 1 to 3 of 3

Counting data by week number

  1. #1
    Scopar
    Guest

    Counting data by week number

    Hi,

    I have a formula set up to count the number of e-mails answered by category
    for each month. The formula being used is:

    =SUMPRODUCT(--(MONTH(Pivot!$E$8:$E$1589)=MONTH($B$1)),--(Pivot!$E$8:$E$1589<>"")*(Pivot!$J$8:$J$1589=A24))

    Where column E contains the date the e-mail was answered; Cell B1 contains
    the date I'm checking and column J contains the category assigned to the
    e-mail and cell A24 is the category I'm trying to get the end result for.

    I'd like to do the same thing but calculate it by week. I was feeling
    rather confident and just substituted "WEEKNUM" for "MONTH" to have:

    =SUMPRODUCT(--(WEEKNUM(Pivot!$E$8:$E$1589)=WEEKNUM($B$1)),--(Pivot!$E$8:$E$1589<>"")*(Pivot!$J$8:$J$1589=A24))

    But I get a result of: #VALUE!

    Can somebody offer advice on where I've gone wrong?


    Thanks in advance,
    Scott

  2. #2
    Biff
    Guest

    Re: Counting data by week number

    WEEKNUM won't work with arrays.

    Biff

    "Scopar" <[email protected]> wrote in message
    news:[email protected]...
    > Hi,
    >
    > I have a formula set up to count the number of e-mails answered by
    > category
    > for each month. The formula being used is:
    >
    > =SUMPRODUCT(--(MONTH(Pivot!$E$8:$E$1589)=MONTH($B$1)),--(Pivot!$E$8:$E$1589<>"")*(Pivot!$J$8:$J$1589=A24))
    >
    > Where column E contains the date the e-mail was answered; Cell B1 contains
    > the date I'm checking and column J contains the category assigned to the
    > e-mail and cell A24 is the category I'm trying to get the end result for.
    >
    > I'd like to do the same thing but calculate it by week. I was feeling
    > rather confident and just substituted "WEEKNUM" for "MONTH" to have:
    >
    > =SUMPRODUCT(--(WEEKNUM(Pivot!$E$8:$E$1589)=WEEKNUM($B$1)),--(Pivot!$E$8:$E$1589<>"")*(Pivot!$J$8:$J$1589=A24))
    >
    > But I get a result of: #VALUE!
    >
    > Can somebody offer advice on where I've gone wrong?
    >
    >
    > Thanks in advance,
    > Scott




  3. #3
    Bob Phillips
    Guest

    Re: Counting data by week number

    Try this

    =SUMPRODUCT(--(1+INT((Pivot!$E$8:$E$1589-(DATE(YEAR(Pivot!$E$8:$E$1589),1,2)
    -WEEKDAY(DATE(YEAR(Pivot!$E$8:$E$1589),1,1))))/7)=WEEKNUM($B$1)),
    --(Pivot!$E$8:$E$1589<>""),--(Pivot!$J$8:$J$1589=A24))

    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    "Scopar" <[email protected]> wrote in message
    news:[email protected]...
    > Hi,
    >
    > I have a formula set up to count the number of e-mails answered by

    category
    > for each month. The formula being used is:
    >
    >

    =SUMPRODUCT(--(MONTH(Pivot!$E$8:$E$1589)=MONTH($B$1)),--(Pivot!$E$8:$E$1589<
    >"")*(Pivot!$J$8:$J$1589=A24))
    >
    > Where column E contains the date the e-mail was answered; Cell B1 contains
    > the date I'm checking and column J contains the category assigned to the
    > e-mail and cell A24 is the category I'm trying to get the end result for.
    >
    > I'd like to do the same thing but calculate it by week. I was feeling
    > rather confident and just substituted "WEEKNUM" for "MONTH" to have:
    >
    >

    =SUMPRODUCT(--(WEEKNUM(Pivot!$E$8:$E$1589)=WEEKNUM($B$1)),--(Pivot!$E$8:$E$1
    589<>"")*(Pivot!$J$8:$J$1589=A24))
    >
    > But I get a result of: #VALUE!
    >
    > Can somebody offer advice on where I've gone wrong?
    >
    >
    > Thanks in advance,
    > Scott




+ 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