View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default counting formula

You can use a helper column. In Z1, enter:

=--(LEN(B1)<LEN(SUBSTITUTE(B1,"Dave",""))) and copy down and then use:

=SUMPRODUCT(--(A1:A100=C5),--(Z1:Z100))

--
Gary''s Student - gsnu200773


"Tendresse" wrote:

i'm using the following formula to count the number of times a certain value
appears in column A when the value in column B=Dave. I want to adjust this
formula so that it counts the number of times a certain value appears in
column A when the value in column B 'contains' the string Dave. Cells in
column B may contain something like Dave Smith (not just Dave).

=SUMPRODUCT(--(A1:A100=C5),--(B1:B100="Dave"))

Thanks in advance.
Excel 2003.