Hi, everyone.
I'm trying to create a tool that splits the name and last name in a cell into three cells (one cell for the first name and the other two for both last names, as we have two last names in Spanish). The rest of the formula is already put together correctly, but I got stumped trying to do something.
I tried to write a formula that counts how many words there are in a cell (by counting spaces and then adding one). The formula looks like this:
The problem is that I want a formula that counts words in a cell EXCEPT certain words. For example, it's common for some last names to include prepositions (like "de Castro"). I do not want to count those as two words, but as one. Could you please help me with this? Thanks!
I'm trying to create a tool that splits the name and last name in a cell into three cells (one cell for the first name and the other two for both last names, as we have two last names in Spanish). The rest of the formula is already put together correctly, but I got stumped trying to do something.
I tried to write a formula that counts how many words there are in a cell (by counting spaces and then adding one). The formula looks like this:
Excel Formula:
=LEN(TRIM(C18))-LEN(SUBSTITUTE(C18," ",""))+1
The problem is that I want a formula that counts words in a cell EXCEPT certain words. For example, it's common for some last names to include prepositions (like "de Castro"). I do not want to count those as two words, but as one. Could you please help me with this? Thanks!