Counting Comma-Separated Values in Excel
We have a bunch of spreadsheets where which have cells with values like this, R1, R2, R3, R4 or C45, C87, C22. It would be very helpful to have another column that could tell us how many values on in these cells (4 and 3 in my example). The way to do it is to use this function, which would tell us how many values are in cell H8.
=LEN(H8)-LEN(SUBSTITUTE(H8,” “,””))+1
The only drawback is if the cell is empty, it will return a 1. This is not a big deal for us, as we’d just delete the function for rows with an empty cell.