@mandarsathe, if this is the requirement, you could do it as outlined in the image shared below:
substring-before substring-after.xlsx (9.5 KB)