Hi
I have file names in column with A123_STUV_XYX.pdf and some files name A567-XYZ_ABC.pdf .
i want output STUV_XYZ.pdf and XYZ_ABD.pdf ,i tried with LEFT and FIND i did not getting desired out.
Hi
I have file names in column with A123_STUV_XYX.pdf and some files name A567-XYZ_ABC.pdf .
i want output STUV_XYZ.pdf and XYZ_ABD.pdf ,i tried with LEFT and FIND i did not getting desired out.
If they file names always follow the same pattern and you want to remove the first 5 characters then you could use this:
=RIGHT(A1,LEN(A1)-5)
Change A1 to suit.
If they are differing in format then you'll need to supply us with a larger sample.
BSB
Hi
Thank you for your reply, Count starts from A01 to A10000 ,so first characters will be different.
After that number, is there always either a dash or an underscore? What other permutations are there?
I agree you need to provide a much bigger set of sample data.
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
NB: as a Moderator, I never accept friendship requests.
Forum Rules (updated August 2023): please read them here.
Hi
this is the format how the file names are :
A01_I T_04-06-2017_09-01-2018.pdf
A02_I T_04-06-2018_09-01-2019.pdf
......
A1001-I T_04-06-2016_09-01-2017.pdf
...
A10000-I T_04-06-2014_09-01-2015.pdf
Then it could be as simple as:
=RIGHT(A1,25)
BSB
Or this:
=MID(RIGHT(SUBSTITUTE(A1,"-","_"),100),FIND("_",RIGHT(SUBSTITUTE(A1,"-","_"),100))+1,100)
Or this:
=IF(ISNUMBER(FIND("-",A1)),RIGHT(A1,LEN(A1)-FIND("-",A1)),RIGHT(A1,LEN(A1)-FIND("_",A1)))
BSB
tons of Thank you ,=MID(RIGHT(SUBSTITUTE(A1,"-","_"),100),FIND("_",RIGHT(SUBSTITUTE(A1,"-","_"),100))+1,100), it worked perfectly.
If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks