Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,688
Default Counting data by week number

WEEKNUM won't work with arrays.

Biff

"Scopar" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default 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" wrote in message
...
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



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default Counting data by week number

Wow! That's brilliant! I'd like to ask why this formula works, but I think
it would be a little beyond me. Besides working it out will give me
something to do over the next few months. :o)

Thank you for your advice.

Scott


"Bob Phillips" wrote:

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" wrote in message
...
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




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Counting data by week number

It's just a simple (<g) little weekday replacement formula because, as Biff
said, WEEKDAY will not return an array of values that SUMPRODUCT can work
on, so we need to build a formula that does return such an array.

--
HTH

Bob Phillips

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

"Scopar" wrote in message
...
Wow! That's brilliant! I'd like to ask why this formula works, but I

think
it would be a little beyond me. Besides working it out will give me
something to do over the next few months. :o)

Thank you for your advice.

Scott


"Bob Phillips" wrote:

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" wrote in message
...
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








  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Counting data by week number

Sorry, meant WEEKNUM not WEEKDAY

--
HTH

Bob Phillips

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

"Scopar" wrote in message
...
Wow! That's brilliant! I'd like to ask why this formula works, but I

think
it would be a little beyond me. Besides working it out will give me
something to do over the next few months. :o)

Thank you for your advice.

Scott


"Bob Phillips" wrote:

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" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Week Numbers (Counting Backwards) JulieS Excel Discussion (Misc queries) 4 July 31st 06 08:37 PM
Vlookup to Return a Range of Data Rob Excel Discussion (Misc queries) 13 June 1st 06 04:02 AM
Macro to insert copied cells [email protected] Excel Discussion (Misc queries) 17 January 18th 06 10:40 AM
evaluate data by week number Steve G Excel Worksheet Functions 1 July 7th 05 09:34 PM
Convert data of cells to any type: Number, Date&Time, Text Kevin Excel Discussion (Misc queries) 0 December 30th 04 06:55 AM


All times are GMT +1. The time now is 03:27 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"