With your sample data in A1:A2
|
A |
1 |
EKI_US_EN_ExcelForum_01132016_main1 |
2 |
EKI_US_EN_ExcelForum_01132015_homepage |
These formulas return all of the left text up to the last underscore (but not including it)
B1: =LEFT(A1,LEN(A1)-MATCH("_",INDEX(MID(A1,LEN(A1)-(ROW(INDIRECT("1:"&LEN(A1)))-1),1),0),0))
or
B1: =LEFT(SUBSTITUTE(A1,"_",REPT(" ",LEN(A1)),LEN(A1)-LEN(SUBSTITUTE(A1,"_",""))),LEN(A1))
These are the results:
|
A |
B |
1 |
EKI_US_EN_ExcelForum_01132016_main1 |
EKI_US_EN_ExcelForum_01132016 |
2 |
EKI_US_EN_ExcelForum_01132015_homepage |
EKI_US_EN_ExcelForum_01132015 |
Is that something you can work with?
Bookmarks