On Fri, 07 Dec 2012 08:20:45 -0000, DaveInDenver <dwkersc...@hotmail.com> wrote:
> How can I modify the formula to test for a date? > > If Column A were dates for example. > A1 = 08/01/12 > A3 = 08/15/12 > A9 = 09/01/12 > > How do I select for Aug 2012? i've found 2 ways, both not ideal. the first is: B1 = 08/01/12 B2 = 09/01/12 B3 = COUNTIF(A1:A9;">="&B1)-COUNTIF(A1:A9;">="&B2) --which looks a bit like a workaround, as i was not able to find a way to apply a regular AND statement. however, this one is the most compatible, since it handles different date formats automatically. the second option is to use wildcards: B1 = COUNTIF(A1:A9;"08/[0-9]{2}/12") or B1 = COUNTIF(A1:A9;"August [0-9]{1,2}, 2012") --which depends greatly on the locale settings and thus lacks compatibility when loading on a different machine. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@openoffice.apache.org For additional commands, e-mail: users-h...@openoffice.apache.org