RIGHT Formula Assistance: Last occurrence of the delimiter
Hi all,
I have a column of data that is similar to the below (complete dummy data), and I need to be able to extract everything after the last delimiter. In this example, I need to extract the B101-TRT-R01 and E44-INI-F01.
XXXn – City/External/1/B101-TRT-R01
XXXn – City/Building n C/D/1/E444-INI-F01
I have found a formula that does work for some, however, not for all and I cannot for the life of me figure out why. there are no patterns that I can see.
=RIGHT(C2,LEN(C2)-SEARCH("$",SUBSTITUTE(C2,"/","$",LEN(C2)-LEN(SUBSTITUTE(C2,"/","")))))
I got this formula from https://www.ablebits.com/office-addins-blog/2017/01/31/excel-right-function-formula-examples/
With the examples above, 1 does work and 1 returns #VALUE
Works XXXn – City/External/1/B101-TRT-R01
Does Not Work XXXn – City/Building n C/D/1/E444-INI-F01
Not all of the values are the same, and not all of them contain -. some have spaces. it feels completely random when looking at the data set, however, I know that they are not random.
0365 EXCEL Desktop Version
Posted Mar 26, 2021, 12:09 AM UTC
it works on both for me...
SOLUTION VERIFIED
yikes, Ive had a shocker here. I was using the wrong cell (c2) where some of the details were filled out, and some where not. Needed to be using A2. your comment made me go back with fresh eyes haha
You have awarded 1 point to Way2trivial
^I ^am ^a ^bot, ^please ^contact ^the ^mods ^with ^any ^questions.
Forgot to say thanks :)