View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Fred Smith[_4_] Fred Smith[_4_] is offline
external usenet poster
 
Posts: 2,389
Default Countif using cell refences

Your first problem is you can't use a range for the search criteria.

If D3 contains a *text* date, you can use:
=COUNTIF(PremierText!B:B,"*" & 'Weekly reports'!D3& "*")

If this still doesn't work, then the likely cause is your cells don't
contain text. If D3 contains a date, then you can try:
=COUNTIF(PremierText!B:B,"*"&Text('Weekly reports'!D3,"mm/dd/yyyy")&"*")
[or maybe "dd/mm/yyyy"]

If neither of these work, post back with what's actually in your cells.
There's no reason you can't get this to work.

Regards,
Fred




"Gnealeuk" wrote in message
...
The formula that i am currently using is
=COUNTIF(PremierText!B:B,"*" & 'Weekly reports'!D3:F3& "*")

Premier text column contains data like "01/01/2010 14:15:05" so basically
a
date and time mixed together,
as this is automatically put like this from the original source,
whereas weekly reports cells D3:F3 contain just the date os 01/01/2010.

"Gord Dibben" wrote:

Show us the formula you are currently using.

Add a few cell references and cell data to go along with it.


Gord Dibben MS Excel MVP

On Sat, 10 Apr 2010 12:48:01 -0700, Gnealeuk
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


.