I have the string similar to "12345_1_13" and I need to remove "_1" from the string to end up with "12345_13". I am really looking for a function to do this, but would settle for a formula. I thank you for your help.
I have the string similar to "12345_1_13" and I need to remove "_1" from the string to end up with "12345_13". I am really looking for a function to do this, but would settle for a formula. I thank you for your help.
T,
if the string always has the same length and the bit to be removed is always at the same place, you could try this.
If this string is in cell A1:Cheers=LEFT(A1,5)&RIGHT(A1,3)
<-- If you're happy & you know it...click the star.:-)
Try ...
=SUBSTITUTE(A1,"_1_","_")
Thank you for both responses. However, Amit the string length can vary between 5 and 7 characters from the left and 1-3 characters to the right and Phuocam, equally the same the "_1_" could be "_999_". Cheers
Perhaps
=LEFT(A1,FIND("_",A1))&MID(A1,FIND("~",SUBSTITUTE(A1,"_","~",2))+1,LEN(A1))
Jindon-Pefect
Or ...
=REPLACE(A1,FIND("_",A1),FIND("_",A1,FIND("_",A1)+1)-FIND("_",A1),"")
=left(a1,find("_",a1))&trim(right(substitute(a1,"_",rept(" ",50)),50))
Last edited by chief_abound; 05-28-2016 at 09:47 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks