Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Does the COUNTIF criteria parameter accepts functions?

I'm trying to use a function (WEEKNUM) as the criteria for a range in
COUNTIF. Is this possible?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Does the COUNTIF criteria parameter accepts functions?

No you can't, and you cannot even use it in SUMPRODUCT because WEEKNUM will
not handle an array of dates. So you have to craft your own

=SUMPRODUCT(--(1+INT(($A$2:$A$20-(DATE(YEAR($A$2:$A$20),1,2)-WEEKDAY(DATE(YEAR($A$2:$A$20),1,1))))/7)=1))

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



wrote in message
...
I'm trying to use a function (WEEKNUM) as the criteria for a range in
COUNTIF. Is this possible?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Does the COUNTIF criteria parameter accepts functions?

Try with SUMPRODUCT.

Pete

On May 22, 6:52*am, wrote:
I'm trying to use a function (WEEKNUM) as the criteria for a range in
COUNTIF. *Is this possible?


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Does the COUNTIF criteria parameter accepts functions?

See my comment on SP.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Pete_UK" wrote in message
...
Try with SUMPRODUCT.

Pete

On May 22, 6:52 am, wrote:
I'm trying to use a function (WEEKNUM) as the criteria for a range in
COUNTIF. Is this possible?



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
How to count a range of number to a given parameter or criteria. Saul Excel Worksheet Functions 4 October 26th 07 11:32 PM
How do you create COUNTIF functions based on multiple criteria? MsBeverlee Excel Worksheet Functions 8 February 19th 07 10:25 PM
Parameter/Criteria option not available for External Data Query rael_lucid Excel Discussion (Misc queries) 2 April 11th 06 03:48 AM
Countif using format criteria not number criteria? Rumbla76 Excel Worksheet Functions 1 April 20th 05 05:38 AM
Countif using format criteria....not number criteria? Troy Excel Worksheet Functions 1 April 20th 05 04:50 AM


All times are GMT +1. The time now is 05:17 PM.

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

About Us

"It's about Microsoft Excel"