delete text in a cell using certian criteria

K

Ken

I have a column with various data in it
How do I delete all the data to the left or right of a certain criteria in
this case a “-“. The data is not aligned so text to columns doesn’t work
 
P

Per Jessen

Hi

With your data in A1 the formulas below will retrieve data Left / Right to
the "-"

=LEFT(A1;FIND("-";A1)-1)
=RIGHT(A1;FIND("-";A1)+1)

Regards,
Per
 
S

Stefi

One way: use a blank helper column with formulae dragged down as required
=LEFT(A1,SEARCH("-",A1)-1) for deleting from A1 to the right
=RIGHT(A1,LEN(A1)-SEARCH("-",A1)) for deleting from A1 to the left
and Copy/PasteSpecial(Values) helper column back to column A!

Regards,
Stefi


„Ken†ezt írta:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top