Share via

Remove some text from a cell

Anonymous
2012-12-27T15:28:44+00:00

I need to eliminate the third word in a cell.   Make this /XXXX/XXXX/**XXXX/**XXXXXX look like this XXXX/XXXX/XXXXXX

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Ashish Mathur 101.9K Reputation points Volunteer Moderator
2012-12-28T00:20:10+00:00

Hi,

Try this

=LEFT(B2,SEARCH("/",B2,SEARCH("/",B2,SEARCH("/",B2)+1)+1)-1)&RIGHT(B2,LEN(B2)-(SEARCH("/",B2,SEARCH("/",B2,SEARCH("/",B2,SEARCH("/",B2)+1)+1)+1))+1)

I have assumed that the value is in cell B2

Hope this helps.

Was this answer helpful?

0 comments No comments

Answer accepted by question author

Anonymous
2012-12-27T15:54:42+00:00

With your first text value in A2, try this formula in an unused column to the right,

=IFERROR(LEFT(A2,FIND("×",SUBSTITUTE(A2,"/","×",3))-1),A2)&IFERROR("/"&MID(A2,FIND("×",SUBSTITUTE(A2,"/","×",4))+1,999),"")

... and fill down as necessary.

edit: made a couple of improvements for no third slash and tightened formula.

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful