ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   delete text in a cell using certian criteria (https://www.excelbanter.com/excel-discussion-misc-queries/183346-delete-text-cell-using-certian-criteria.html)

Ken

delete text in a cell using certian criteria
 
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 doesnt work


Per Jessen

delete text in a cell using certian criteria
 
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

"Ken" skrev i meddelelsen
...
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 doesnt work



Stefi

delete text in a cell using certian criteria
 
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:

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 doesnt work


Ken

delete text in a cell using certian criteria
 
hi per thanks for the help
i recieve an error message on the formula when i use ";"

"Per Jessen" wrote:

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

"Ken" skrev i meddelelsen
...
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 doesnt work




Ken

delete text in a cell using certian criteria
 
great

"Ken" wrote:

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 doesnt work



All times are GMT +1. The time now is 04:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com