Hollywoood
Board Regular
- Joined
- Aug 11, 2011
- Messages
- 53
Hi all, I am sure this is very simple but I just do not seem to be returning the correct result. I am trying to count the occurences with two separate and independent strings of text both exist in a worksheet.
I have been trying variations of the following with no success
IF(A2<>"",COUNTIF('Sheet1'!M:M,AND("*"&A2&"*","*"&"STRING TWO"&"*")),"")
In english my intent is to look at column M:M of Sheet1 and count the instances, where A2 is non non null, the text in cell A2 as well as the specified text for string 2 both exist in a given cell. I believe my problem is in the underlined area. I have a similar formula that works perfect without the AND clause and second string ie) =IF(A2<>"",COUNTIF('Sheet1'!M:M,"*"&A2&"*"),"")
As always thanks for your time and help
I have been trying variations of the following with no success
IF(A2<>"",COUNTIF('Sheet1'!M:M,AND("*"&A2&"*","*"&"STRING TWO"&"*")),"")
In english my intent is to look at column M:M of Sheet1 and count the instances, where A2 is non non null, the text in cell A2 as well as the specified text for string 2 both exist in a given cell. I believe my problem is in the underlined area. I have a similar formula that works perfect without the AND clause and second string ie) =IF(A2<>"",COUNTIF('Sheet1'!M:M,"*"&A2&"*"),"")
As always thanks for your time and help