delete text in a cell using certian criteria

  • Thread starter Thread starter Ken
  • Start date Start date
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
 
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
 
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:
 
Back
Top