COUNTIF Question
The following countif function works well for me but I was wondering how I could use a date range criteria from a different column. I want to count all ocurrences of "Metro" in the month of Otcober. =COUNTIF('PRT Metrics'!M8:M78,"Metro") This formula counts all occurences of the word "Metro" in the range M8:M78. I'd like to count all occurence within a given month. -- zbert ------------------------------------------------------------------------ zbert's Profile: http://www.excelforum.com/member.php...o&userid=15920 View this thread: http://www.excelforum.com/showthread...hreadid=274000 |
That requires a formula for multiconditional counting with a different function... Assuming that 'PRT Metrics'!$N$8:$N$78 is the date range: =SUMPRODUCT(--('PRT Metrics'!$M$8:$M$78=E2),--(MONTH('PRT Metrics'!$N$8:$N$78)=MONTH(F2)),--(YEAR('PRT Metrics'!$N$8:$N$78)=YEAR(F2))) where E2 houses a condition like Metro and F2 a date condition like 10/1/04 (a true date), possibly formatted as mmm-yy to read Oct-04. Adjust to suit. zbert Wrote: The following countif function works well for me but I was wondering how I could use a date range criteria from a different column. I want to count all ocurrences of "Metro" in the month of Otcober. =COUNTIF('PRT Metrics'!M8:M78,"Metro") This formula counts all occurences of the word "Metro" in the range M8:M78. I'd like to count all occurence within a given month. -- Aladin Akyurek ------------------------------------------------------------------------ Aladin Akyurek's Profile: http://www.excelforum.com/member.php...fo&userid=4165 View this thread: http://www.excelforum.com/showthread...hreadid=274000 |
Try this, with the date in Column N:
=SUMPRODUCT((M8:M78="Metro")*(MONTH(N8:N78)=10)) -- HTH, RD --------------------------------------------------------------------------- Please keep all correspondence within the NewsGroup, so all may benefit ! --------------------------------------------------------------------------- "zbert" wrote in message ... The following countif function works well for me but I was wondering how I could use a date range criteria from a different column. I want to count all ocurrences of "Metro" in the month of Otcober. =COUNTIF('PRT Metrics'!M8:M78,"Metro") This formula counts all occurences of the word "Metro" in the range M8:M78. I'd like to count all occurence within a given month. -- zbert ------------------------------------------------------------------------ zbert's Profile: http://www.excelforum.com/member.php...o&userid=15920 View this thread: http://www.excelforum.com/showthread...hreadid=274000 |
All times are GMT +1. The time now is 05:16 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com