ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Countif with more than one criteria (https://www.excelbanter.com/excel-discussion-misc-queries/146461-countif-more-than-one-criteria.html)

Joco

Countif with more than one criteria
 
hi
I have read the various discussions on countif and can't find the correct
solution to my question.

My spreadsheet contains dates in column B. I want to show a summary in a
single cell for each year, firstly the year (2004) and secondly the number of
individual dates for that year (16)

I have used ="2004"&" "&countif(b1:b105,"<383532) this works fine for
the 1st year.

For the second year the formula needs to show from and to numbers,
representing the first and last dates in the year.

I have tried a countif -countif fomula, but this shows an incorrect numer

Any help would be greatly appreciated

Thanks Joco in London

Bob Phillips

Countif with more than one criteria
 
=SUMPRODUCT(--($B$1:$B$105=--"2006-01-01"),--($B$1:$B$105<=--"2006-03-30")

as an example

--
HTH

Bob

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

"Joco" wrote in message
...
hi
I have read the various discussions on countif and can't find the correct
solution to my question.

My spreadsheet contains dates in column B. I want to show a summary in a
single cell for each year, firstly the year (2004) and secondly the number
of
individual dates for that year (16)

I have used ="2004"&" "&countif(b1:b105,"<383532) this works fine for
the 1st year.

For the second year the formula needs to show from and to numbers,
representing the first and last dates in the year.

I have tried a countif -countif fomula, but this shows an incorrect numer

Any help would be greatly appreciated

Thanks Joco in London




Joco

Countif with more than one criteria
 
Thanks Bob

Your formula gives me exactly what I want

Joco

"Bob Phillips" wrote:

=SUMPRODUCT(--($B$1:$B$105=--"2006-01-01"),--($B$1:$B$105<=--"2006-03-30")

as an example

--
HTH

Bob

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

"Joco" wrote in message
...
hi
I have read the various discussions on countif and can't find the correct
solution to my question.

My spreadsheet contains dates in column B. I want to show a summary in a
single cell for each year, firstly the year (2004) and secondly the number
of
individual dates for that year (16)

I have used ="2004"&" "&countif(b1:b105,"<383532) this works fine for
the 1st year.

For the second year the formula needs to show from and to numbers,
representing the first and last dates in the year.

I have tried a countif -countif fomula, but this shows an incorrect numer

Any help would be greatly appreciated

Thanks Joco in London






All times are GMT +1. The time now is 04:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com