jana
asked on
Function or formula to identify the last repeated character in a cell in Excell
We have a list of files in an excel and want to separate their file extension. We are using a combination of commands like search(), len(), left(), right(). However some files has various periods in their name (for example, file.of.mine.txt), thus making it difficult to set the 3 character of the extension. So we thought if we can identify the last period we can calculate the exact 3 or 2 or 5 extension that a file may have (for example, filename.text or filename.manifext).
please advice.
please advice.
strExtension = Split("file.of.mine.txt", ".")(UBound(Split("file.of .mine.txt" , ".")))
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The formula worked excellently separating the extension, but how do modify the formula to identify the last repeated period (".")?
I don't understand. What do you mean by "identify"?
ASKER
example,
in file.of.mine.txt, the last "." is in the 13 position. We want to identify the last ".".
in file.of.mine.txt, the last "." is in the 13 position. We want to identify the last ".".
@rayluvs
Have you tested the other comments?
Have you tested the other comments?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The other comments don't work in the cell, we want work directly on Excel cell.
Thanx Rg worked!
Thanx Rg worked!
Example:
Open in new window
Note: You can also get this information with a FileSystemObject