View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Go Bucks!!![_2_] Go Bucks!!![_2_] is offline
external usenet poster
 
Posts: 28
Default Countif contains a word in a reference cell


Good morning,


I have a range of information that contains text and 0,1's. The text will
change each report. In performing a summary, I want the formula to look at a
reference cell and tell me if the text *contains* the word in my reference
cell. For example,

Where Sheet 1 is a summary page and Sheet 2 contains the data (text and
0's/1's).

A B
1 Summary
2 Samsung 2
3 Micron 1
4 IBM 0
Sheet 1

A B
1 IBM Fishkill, NY 0
2 IBM 0
3 Samsung Austin 1
4 Micron 0
5 Samsung 1
6 Samsung 0
7 Micron 1
8 Samsung 0
9 Micron 0
10 Micron 0
Sheet 2


I was attempting with the following formula:

=IF(COUNTIFS(Sheet2!B1:B10,0,Sheet2!A1:A10,Sheet1! A2)=0,"",COUNTIFS(Sheet2!B1:B10,0,Sheet2!A1:A10,Sh eet1!A2))

Forumula currently only detects an exact match with contents of Sheet1!A2,
e.g. "samsung". I need it to return the count if it contains samsung. Result
should be 2.

Thanks,