Home > OS >  How to format the entire column to show the string stored partially
How to format the entire column to show the string stored partially

Time:09-09

rookie here. I have been looking for the solution to this for some time but I either don't know the keywords that search for the solution or I just don't understand how it works.

I am working with an excel spreadsheet with a few columns of data, one of which looks like this:

C:\Users\Desktop\figure\2012fig1-1.png
C:\Users\Desktop\figure\2012fig1-2.png
C:\Users\Desktop\figure\2012fig2-1.png
C:\Users\Desktop\figure\2012fig2-2.png
C:\Users\Desktop\figure\2013fig1-1.png

Now, I want the columns to just show the latter part, so that it becomes:

2012fig1-1.png
2012fig1-2.png
2012fig2-1.png
2012fig2-2.png
2013fig1-1.png

Is there a way to edit the entire column, to delete the former part, or to make the cells display the latter part? I am not sure which way works and which works the best. Would anyone be kind enough to help me out with this, please?

CodePudding user response:

Use below formula.

=TRIM(RIGHT(SUBSTITUTE(A1,"\",REPT(" ",100)),100))

If you have most recent release of Microsoft-365 then could try.

=TEXTAFTER(A1,"\",-1)

enter image description here

CodePudding user response:

Just select the column.

Data tab - text to column - select "Delimited" - next - choose Other and enter "" in the box - next - Finish

You can keep which part you want and delete others

enter image description here

enter image description here

  • Related