Created
July 11, 2014 20:34
-
-
Save 3leftturns/3aee61e6f873b0ecba91 to your computer and use it in GitHub Desktop.
Excel return value of second search character in substring
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is the text to search, in cell A1: | |
Andy Is Awesome | |
Use the =FIND function to get the index of the first space: | |
=FIND(<text to search for>, <text to search in>, <index to start at>) | |
=FIND(" ", A1) | |
Returns 5 | |
Nesting another find into the formula under the index parameter gives you the second space. Incrementing by 1 in the index field starts the search after the first space. | |
=FIND(" ",A1,FIND(" ",A1)+1) | |
Returns 8 | |
This is useful for separating data that has been concatenated together separated by spaces. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment