Hello,
Have a form with and EnumList with {1-A1, 2-A2, 3-A4, 1-L1, 2-L2, 3-L3}
I would like to count how many times anything with โ-Aโ is selected in a virtual column. It should count the options the users selected in the open form, so not in the spreadsheet yet.
Any help would be appreciated.
Thanks.
Solved! Go to Solution.
Maybe try this. Convert the list to Text first, then split the Text back into a List, but on the characters โ-Aโ, then count the List.
COUNT( SPLIT( TEXT( [enumlist] ) , "-A" ) )
Are the values you listed the only possible options there will ever be?
You could perhaps just do a simple brute-force expression:
0
+
IF( IN( "1-A1" , [enumlist] ) , 1 , 0 )
+
IF( IN( "2-A2" , [enumlist] ) , 1 , 0 )
+
IF( IN( "3-A4" , [enumlist] ) , 1 , 0 )
Thanks, but no - EnumList is dynamic, thatโs why Iโm trying to count if list item has โ-Aโ.
Maybe try this. Convert the list to Text first, then split the Text back into a List, but on the characters โ-Aโ, then count the List.
COUNT( SPLIT( TEXT( [enumlist] ) , "-A" ) )
Very close
It works, but starts off with 1 even if the EnumList is clear; choosing 4 options with โ-A4โ gives a count of 5.
I can add a -1 to the end of the expression, but would rather notโฆ any ideas?
Thank you again
Yes, do that. Why do you not want to?
Because I want to know/learn why thereโs a 1
If you cut something 0 times, how many pieces do you have?
If you cut something 4 times, how many pieces do you have?
Thanksโฆ makes sense
User | Count |
---|---|
35 | |
30 | |
30 | |
20 | |
18 |