string function which returns the number of occurences of a sub-string
I regularly have comma separated lists, and would like to know how many values there are in the string. Currently do that in VBA, but it would be nice if there was a function for that. E.g.:
A1 = "abc, def, pqr, xyz"
B1 = PARAMS(A1,[optionally]",") optionally so that you can do ; or others as well
I think it would be nice to incorporate regular expression patterns in this feature request.
Jan Wx, NZ commented
Hi Paul, almost, very elegant, however, if there is only one parameter or if it is a blank cell, yours doesn't give the right answer. Great work though.
Phil Smith commented
For text in cell A1. The number of comma seperated elements will be