PDA

View Full Version : [SOLVED:] Remove part of a string



rjw29bs4
01-03-2022, 02:39 AM
i am trying to remove all of string before the first , but when i do find and replace it remove all of string before upto last ,
please advise please find example

3340 30MAR18 C , B AND M RETAIL , AVONMEADS GB

just want to remove just to the left of the first ,

rollis13
01-03-2022, 11:22 AM
Supposing your data is in cell A1 you could use:
=MID(A1,FIND(",",A1,1)+1,LEN(A1))
or without extra spaces:
=TRIM(MID(A1,FIND(",",A1,1)+1,LEN(A1)))

Paul_Hossler
01-05-2022, 11:33 AM
Is this Word or Excel? You posted in the Excel forum so I assume it's an Excel question

rollis13 gave you a Excel formula in Post#2. Did it work?

Your post#1 was titled "Remove part of string" and your post #3 (since deleted) was titled "help Edit string"

Also somehow the same 3 posts are in another thread marked Moved, but I can't see where from or to


So to try and clean this up

1. I deleted the 'Moved' duplicate copy of the thread

2. I deleted your repeat in Post #3 of the original question

If rollis13's worksheet formula works for you, you can mark the thread solved

rjw29bs4
01-06-2022, 12:38 AM
All the srring is in b2 when I change your line to b2 it just returns the word value.
What am I doing wrong

rollis13
01-06-2022, 12:55 AM
With your string in B2 the formulas become:
=MID(B2,FIND(",",B2,1)+1,LEN(B2))
or:
=TRIM(MID(B2,FIND(",",B2,1)+1,LEN(B2)))
You can use the formula in any other cell of the sheet except in B2. If used in other sheet you need to add the reference to the sheet where your data is.