If you need to know in which position a particular character is in a cell, the FIND function is exactly what you need.
Let's say you have a list of names. Both first and last name in one cell separated by a space. If by chance you want to know in which position the space is in, the formula is as simple as =FIND("What you're looking for", The cell that contains what you're looking for). That's it!
Here's a visual example.
Just remember that if what you're looking for is text, you need to enclose the search item in quotes (to find a space, we use " ")
As you can see the result is 7, meaning the space is the 7th character within that cell.
One other thing to keep in mind is that the formula will only find the first instance of what it is looking for. As you see in the example above on row 6, "John Quincy Adams" has 2 spaces, however the result of the formula is 5, meaning the space is in the 5th position. Once ANY formula finds what it is looking for, it stops looking and thus there is no mention of the 2nd space. (There is a way to find the 2nd and subsequent spaces, that's a little more advanced so it will be another topic for a later date).
No comments:
Post a Comment