Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() =COUNTIF('mail-data'!D2:D1000, "12/01/2005and<01/01/2006") I've been trying to count a cell range that contains data on another sheet 'mail-data', where the date is bigger than 1 december 2005 and smaller than 1 january 2006. I keep getting error messages. help would be appreciated. Thanks ArchivesGirl -- archivesgirl ------------------------------------------------------------------------ archivesgirl's Profile: http://www.excelforum.com/member.php...o&userid=31827 View this thread: http://www.excelforum.com/showthread...hreadid=515511 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
ArchivesGirl
The COUNTIF() function accepts only primitive level conditions such as: =COUNTIF('mail-data'!D2:D1000, "6") For more complex criteria we use virtual arrays: =SUMPRODUCT(--('mail-data'!D2:D1000DATE(2005,12,1))*--('mail-data'!D2:D1000<DATE(2006,12,1))) As you see we mutliply two arrays, which are based on D2:D100 yet are virtual, producing a 0 or 1 in the positions of dates satisfying the criterion. When a date is in dec2006 it satisfies both conditions, hence the two 1's in this position multiplied give us 1 instead of 0, which happens in all other cases. Summing the 1's gives you the count. HTH Kostis Vezerides |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Thank you very much Vezerid. I've tried it and it works great. -- archivesgirl ------------------------------------------------------------------------ archivesgirl's Profile: http://www.excelforum.com/member.php...o&userid=31827 View this thread: http://www.excelforum.com/showthread...hreadid=515511 |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I am glad it worked. I also hope the explanations will help you devise
similar formulas in the future. Regards Kostis Vezerides |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Match then lookup | Excel Worksheet Functions | |||
countif formula | Excel Discussion (Misc queries) | |||
Formula checking multiple worksheets | Excel Worksheet Functions | |||
COUNTIF formula problems | Excel Discussion (Misc queries) | |||
Countif formula with multiple criteria ie >30 and <60? | Excel Worksheet Functions |