How do I delete part of a text string in every cell it appears in

G

Guest

I need to delete just part of a text string that will appear in many
different cells.

For example. 1234-DAW001 5678-DAW001 8254-DAW001 etc etc

Is it possible to delete the DAW001 reference in each cell but leave the
number alone, without going into each individual cell. Would this require a
Macro?

I have 1900 cells that have text strings like this and I would like to
change them all to the first 4 digits only
 
G

Guest

Try this:
Select your range
Edit>Replace
Find what: -*
Replace with: (leave this blank)
Click the [Replace All] button

If that goes REALLY WRONG....Edit>Undo

Does that help?

***********
Regards,
Ron
 
V

Vito

One possibility is to add a column (perhaps temporarily) and enter the
formula =Left(A1,4), where A1 contains the first item to convert, then
you copy down the formula as far as needed.

Then you can hide the original or you can Copy - Paste Special Values
your new results over the originals and then delete the temporary
column.
 
G

Gord Dibben

How about Data>Text to Columns>Delimited by "-"

Skip the right-hand column by "do not import"


Gord Dibben Excel MVP
 

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