Suppose you have a list of data values in A1:A10, where within the
text in each cell is a date-like string. E.g., abcd9/12/2010def
Put in cell C1 the date you want to search for in A1:A10, and format
it in the same format as it appears in the values in A1:A10. For
example, if you have 09/12/2010 somewhere in the strings in A1:A10, C1
must be formatted exactly the same way. It won't work if the formats
are different.
Then, use the following array formula:
=SUM(--(NOT(ISERROR(FIND(T(E1),A1:A10)))))
This is an array formula, so you MUST press CTRL SHIFT ENTER rather
than just ENTER when you first enter the formula and whenever you edit
it later. If you do this correctly, Excel will display the formula in
the formula bar enclosed in curly braces { }. You don't type in the
braces; Excel puts them there automatically. The formula will not work
correctly if you do not enter it with CTRL SHIFT ENTER. See
www.cpearson.com/Excel/ArrayFormulas.aspx for much more information
about array formulas.
Cordially,
Chip Pearson
Microsoft Most Valuable Professional,
Excel, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
On Sat, 10 Apr 2010 12:48:01 -0700, Gnealeuk
<(E-Mail Removed)> wrote:
>i would like to add a formula into my spreadsheet that counts if a date in a
>previous cell appears, but the date is constantly being changed so therefore
>i would like the formula to contain a cell reference instead of the date,
>other problem is that the date will be encoded in other data, therefore i
>need to wild card it at the beggining and the end with *'s but it doesnt seem
>to want to work with a cell reference and not a constant number