0

How to count comma separated specific values in a single cell in excel. Suppose to found how many 15's are there in a single cell that contains 15,115,1515,15,215,15 I need the result 3. Is there any formula in excel

JvdV
  • 53,146
  • 6
  • 36
  • 60

1 Answers1

2

One way is to compare the length of the original value with the length of the value after you've replaced all the 15s with a zero-length string, and divide that by 4 (which is the length of ",15,").

One important note... make sure to add a comma to the start and end of the original string to pick up leading and trailing 15s.

Here's what it would look like... enter image description here

John Joseph
  • 918
  • 1
  • 7
  • 16