For automation purposes, I am trying to extract an identifying number from a cell that has multiple, varying characters on either side (hence why no left or right, unless you have a fancy way to use them). Workbook attached
For automation purposes, I am trying to extract an identifying number from a cell that has multiple, varying characters on either side (hence why no left or right, unless you have a fancy way to use them). Workbook attached
Hello wdguitar. Welcome to the forum.
Try this:Formula:Please Login or Register to view this content.
Dave
One way:Formula:Please Login or Register to view this content.
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
Here's another way if that space character following the 'target' string is always the 3rd space.Formula:Please Login or Register to view this content.
@FR: quicker and neater . I ALWAYS forget that approach and go back to my first principles. One day it will sink in .
@ TMS
Yeah I feel your pain. These are often tempting to play with off screen.
This worked great! Thank you so much!
I think this formula should also work...
Formula:Please Login or Register to view this content.
Last edited by Rick Rothstein; 08-19-2021 at 10:31 PM.
@Rick: concatenating a potentially missing value to the end of the string to avoid the FIND failing … yet another approach that doesn't automatically come to mind. Must try to improve my memory!
This may be work also.
In B2
=trim(mid(substitute(a2&" "," ",rept(" ",len(a2)+1)),(len(a2)+1)*2+find("#",a2)-1,len(a2)))
2 from 2 spaces before # sign.
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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks