jeffgibson55
New Member
- Joined
- Aug 22, 2011
- Messages
- 17
I'm using Excel 2007. I'm looking for a way to reference a specific cell to determine the exact location of a specific character that occurs multiple times in the string. In this case I want the numeric location of the last occurrence of the character "-" so I can extract all the text to the right of it. I've done this in the past using the find function but that always starts left to right and in my data set each cell has a different number of occurrences of the delimiting text ("-") and in this case I only care about the last occurrence of this character.
For what it's worth I'm able to count the number of the occurrences of the character ("-") in a cell with this formula: =SUM(LEN(<range>)-LEN(SUBSTITUTE(<range>,"text","")))/LEN("text") where "range" is the cell and "text" is "-", but I don't know how to find the position of the final occurrence of "-".
Any help would be most appreciated.
Thanks,
Jeff
For what it's worth I'm able to count the number of the occurrences of the character ("-") in a cell with this formula: =SUM(LEN(<range>)-LEN(SUBSTITUTE(<range>,"text","")))/LEN("text") where "range" is the cell and "text" is "-", but I don't know how to find the position of the final occurrence of "-".
Any help would be most appreciated.
Thanks,
Jeff