[Excel] COUNTIF with partial text string
Solved
lecastorlapon
-
LGLCNfamily -
LGLCNfamily -
Hello,
I am trying to count the number of cells that contain a certain text that is only a part of the value of the cell. Example:
Cell 1: Marc is handsome
Cell 2: Marc is rich
Cell 3: Sophie is beautiful
I want a formula that counts the number of cells where "Marc" appears, which is 2 here. I think I need to tweak the COUNTIF function, but I don't know how.
Thank you for your help
Configuration: Windows 7 / Firefox 8.0
I am trying to count the number of cells that contain a certain text that is only a part of the value of the cell. Example:
Cell 1: Marc is handsome
Cell 2: Marc is rich
Cell 3: Sophie is beautiful
I want a formula that counts the number of cells where "Marc" appears, which is 2 here. I think I need to tweak the COUNTIF function, but I don't know how.
Thank you for your help
Configuration: Windows 7 / Firefox 8.0
Anyway, thanks for the tip.
No, this does not apply, for example, with formulas that use a mathematical operator such as +, - > < as a field separator
but only via the semicolon
for example:
=IF(A1="*A*"... does not work
however:
VLOOKUP("*A*";Field... works. as well as MATCH("*"&B1&"*";Field)
the same with SUMIF("*"&B1&"*";.....
Etc...
additionally and for your information
if you write
"*"&B1 or "*text", the formula only searches for the first word of the text
with
B1&"*" or "text*", with the last word surrounded by two asterisks, the code searches anywhere in the text.
Safe travels
Best regards
Otherwise, for mono pseudo, it comes from my nickname (Castor) and a sketch by Les Nuls about Lapp beavers.
See you!