Count Words Separated by Commas with LEN & SUBSTITUTE functions in a formula. Using LEN and SUBSTITUTE we can count the commas in "rad,cool, super" and get two then add one more to get three. This trick is useful because it can help us to count words, numbers or fields in a text string.
This trick is the basis for many other Tricks with Excel Formulas that analyze text strings.
Search for and watch this video title:
excelisfun Search & Find Excel Videos, Playlists, Download Excel Workbooks
ExcelIsFun 1 year ago
kindly give me above worksheet in Excel.
raja10pk 1 year ago
Dear dukeofscouts,
The logic of all these tricks is to find some pattern to exploit. We found commas as our pattern.
The 5 numbers that are not zero are: 5 and 658 and 9 87 and 1.
To count the individual characters that are numbers, use this:
LEN(SUBSTITUTE(SUBSTITUTE(B19,",0",""),",","")
What are you trying to accomplish with the AND and SUBSTITUTE?
--excelsifun
ExcelIsFun 2 years ago
How was the last count 5? I count 8 numbers.
Also can you use the AND function with a substitute?
dukeofscouts 2 years ago