Hi Friends
I have attached the example file. I want to extract specific text from the value in cell.
For example, I want to extract G001 from cell A2, G005A from cell A3 etc.
Is there any way someone can assist?
Many thanks in advance
Hi Friends
I have attached the example file. I want to extract specific text from the value in cell.
For example, I want to extract G001 from cell A2, G005A from cell A3 etc.
Is there any way someone can assist?
Many thanks in advance
Is it always the last but one item in the string?
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.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
Forum Rules (updated August 2023): please read them here.
Please try at B2
=TRIM(LEFT(RIGHT(SUBSTITUTE(A2,"-",REPT(" ",20)),40),20))
Thanks but this doesnt work with my actual text string which is "Shop 1 - G001 - Moonview Shopping Centre".
Yes it will be there in the text string as per my example file attached.
Just increse the number
=TRIM(LEFT(RIGHT(SUBSTITUTE(A2,"-",REPT(" ",100)),200),100))
Did your text have any more pattern explaination ?
Like
prefix - XXXX - suffix
while prefix and suffix can contain a "-" (or not)
By the way, Bo_Ry's formula can already extract your desired text form your sample file.
Regards.
My English is very poor, so please be patient >_<"
My Dynamic Related Dropdown post:
https://www.excelforum.com/excel-for...ml#post5657376
https://www.excelforum.com/excel-for...ml#post5655711
https://www.excelforum.com/excel-for...ml#post5655762
This is perfect. Thanks a lot. It works perfectly.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks