Countif and Multi line cell
Column 1: Status
Column2: Count
Column 1: test
Column 2: =COUNTIF([BOP Status]@row, "test")
Result = 1
Column 1: 2 lines. (1st line "test" , then Altenter, then "found in a test"
Column 2: =COUNTIF([BOP Status]@row, "test")
Result =0
Is there something about using AltEnter that causes this issue? is there a workaround?
Thanks
Best Answer

Hey @DanielGD
It's not necessarily that the AltEnter is causing the problem  it's that you're trying to count multiple occurrences in a text string.
There is a workaround
=(LEN([Column 1]@row)  LEN(SUBSTITUTE([Column 1]@row, "test", ""))) / LEN("test")
This is looking at the length (number of characters) of the entire string, subtracts the non "test" characters, which means what is left should be a string length in multiples of the word "test". By dividing by the test length we can see how many multiples were in the original string.
Does this work for you?
Kelly
Answers

Hey @DanielGD
It's not necessarily that the AltEnter is causing the problem  it's that you're trying to count multiple occurrences in a text string.
There is a workaround
=(LEN([Column 1]@row)  LEN(SUBSTITUTE([Column 1]@row, "test", ""))) / LEN("test")
This is looking at the length (number of characters) of the entire string, subtracts the non "test" characters, which means what is left should be a string length in multiples of the word "test". By dividing by the test length we can see how many multiples were in the original string.
Does this work for you?
Kelly

Thank you Kelly. Works perfectly!
Help Article Resources
Categories
Check out the Formula Handbook template!