#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 122
Default CountIF Help

Can someone please help me with writing a function? I would like to count
the number of cells containing a date given some criteria. The example would
be: If Column A is not blank, and Column B contains the word "Open", and
Column C contains a date, then count the number of cells in column C that has
a date.
Thank you
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 51
Default CountIF Help

If you use Excel 2007, you can use the COUNTIFS function.

Otherwise, you can use this formula:

=SUMPRODUCT(--(A:A<""), --(B:B="Open"), --(C:C<0))

I'm assuming that the only things in the column C are dates, or they would
be blank.

(Note: I don't have excel with me right now, so I didn't get a chance to
test the formula above. Sorry about that.)

--
Location: Sydney
Occupation: Actuarial Consultant (Project Finance/Financial Modeling)


"Glenn" wrote:

Can someone please help me with writing a function? I would like to count
the number of cells containing a date given some criteria. The example would
be: If Column A is not blank, and Column B contains the word "Open", and
Column C contains a date, then count the number of cells in column C that has
a date.
Thank you

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default CountIF Help


"Harimau" wrote in message
...
If you use Excel 2007, you can use the COUNTIFS function.

Otherwise, you can use this formula:

=SUMPRODUCT(--(A:A<""), --(B:B="Open"), --(C:C<0))



No you can't, SUMPRODUCT prior to Excel 2007 doesn't work with complete
columns, you have to specify a range.


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 122
Default CountIF Help

Harimau,

Thank you for you quick and correct response. I applied your logic to my
spreadsheet, which was much more advanced than my example, and it worked! I
did note that you did not specify a range for your cells and I knew that I
needed to do that with my version of excel.
Bob: Thanks for confirming that for me.

Thanks again!

"Harimau" wrote:

If you use Excel 2007, you can use the COUNTIFS function.

Otherwise, you can use this formula:

=SUMPRODUCT(--(A:A<""), --(B:B="Open"), --(C:C<0))

I'm assuming that the only things in the column C are dates, or they would
be blank.

(Note: I don't have excel with me right now, so I didn't get a chance to
test the formula above. Sorry about that.)

--
Location: Sydney
Occupation: Actuarial Consultant (Project Finance/Financial Modeling)


"Glenn" wrote:

Can someone please help me with writing a function? I would like to count
the number of cells containing a date given some criteria. The example would
be: If Column A is not blank, and Column B contains the word "Open", and
Column C contains a date, then count the number of cells in column C that has
a date.
Thank you

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
hELP ON COUNTIF Pietro Excel Discussion (Misc queries) 1 June 17th 07 01:50 PM
How do I use a countif function according to two other countif fu. Kirsty Excel Worksheet Functions 2 February 20th 06 11:44 AM
edit this =COUNTIF(A1:F16,"*1-2*")+COUNTIF(A1:F16,"*2-1*") sctroy Excel Discussion (Misc queries) 2 September 25th 05 04:13 AM
COUNTIF or not to COUNTIF on a range in another sheet Ellie Excel Worksheet Functions 4 September 15th 05 10:06 PM
COUNTIF in one colum then COUNTIF in another...??? JonnieP Excel Worksheet Functions 3 February 22nd 05 02:55 PM


All times are GMT +1. The time now is 06: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"