I frequently use the "Search" function when extracting text from a cell as part of the "Left", "right" or "Mid" functions.
1) Does anyone know of a way to find the 2nd, 3rd, 4th or 5th occurance of text withing a cell like Lotus 1-2-3 used to allow?
2) Does anyone know of a relatively clean way to find the location of text starting from the right side of the cell (search and find start at the left side... position 1)?
For example, if I wanted to extract the First and Last Name from a cell, it would be helpful to know the location of the first blank in the cell and the last blank in the cell. The first blank I can do, it's the the last blank which stumps me.
For example:
a1 = "Joe Smith"
b1 = "Jane A. Jones"
c1 = "Tom and Sandy Franks"
to extract the first name I would use the formula =left(a1,search(" ",a1,1)-1)
If I could find the last blank then I could use the "right" function to get the last name. Nested search function could work in some cases but in this example the number of spaces varies.
1) Does anyone know of a way to find the 2nd, 3rd, 4th or 5th occurance of text withing a cell like Lotus 1-2-3 used to allow?
2) Does anyone know of a relatively clean way to find the location of text starting from the right side of the cell (search and find start at the left side... position 1)?
For example, if I wanted to extract the First and Last Name from a cell, it would be helpful to know the location of the first blank in the cell and the last blank in the cell. The first blank I can do, it's the the last blank which stumps me.
For example:
a1 = "Joe Smith"
b1 = "Jane A. Jones"
c1 = "Tom and Sandy Franks"
to extract the first name I would use the formula =left(a1,search(" ",a1,1)-1)
If I could find the last blank then I could use the "right" function to get the last name. Nested search function could work in some cases but in this example the number of spaces varies.