Skip to main content

hi


i need help counting a field with multiple values separated by a semi -colon. This column catches data from jotform, which is a multi-select field.

Are you trying to count the number of items in the text field? And items are separated by a semi-colon?



Try this formula:



IF(

{fieldName},

LEN({fieldName}) - LEN(SUBSTITUTE({fieldName}, ";", "")) + 1

)



This formula uses the trick of replacing the semi-colons with nothing and then comparing the length of the text string with the original length to determine the number of semi-colons. Since semi-colons are only in between values, you have to add one to the number of semi-colons to find the number of items.


Are you trying to count the number of items in the text field? And items are separated by a semi-colon?



Try this formula:



IF(

{fieldName},

LEN({fieldName}) - LEN(SUBSTITUTE({fieldName}, ";", "")) + 1

)



This formula uses the trick of replacing the semi-colons with nothing and then comparing the length of the text string with the original length to determine the number of semi-colons. Since semi-colons are only in between values, you have to add one to the number of semi-colons to find the number of items.


The incredibly clever lengths we go to lacking a Split() function. I’m seriously impressed and dismayed at the same instant.


Reply