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
 All Categories
 14 Welcome to the Community
 Smartsheet Customer Resources
 61.4K Get Help
 323 Global Discussions
 197 Industry Talk
 418 Announcements
 4.2K Ideas & Feature Requests
 127 Brandfolder
 154 Just for fun
 124 Community Job Board
 441 Show & Tell
 26 Member Spotlight
 1 SmartStories
 278 Events
 34 Webinars
 7.3K Forum Archives
Check out the Formula Handbook template!