Excel Text Editing

S

S Halk

I would like to delete all text that is to the right of a
hyphen in many cells top to bottom of the spreadsheet; I
also want to delete the hyphen. The text left of the
hyphen is of various lengths but a maximum of 9
characters, both letters and numbers.
 
D

Dave Peterson

If your data is in a single column, you could use Data|Text to columns

Then delimited (by a dash)

Then choose to skip the fields you don't want.

Or maybe just Edit|replace would work for you:
Select your cells
edit|replace
what: -* (dash asterisk)
with: (leave blank)

replace all
 
E

Earl Kiosterud

S,

In a helper column (row, whatever), put
=LEFT(C2,SEARCH("-",C2)-1)
where C2 is the cell. That should yield the text you want. To permanently
change the original stuff, you can now copy the formula cell, then select
the original stuff, Edit - Paste Special - Values, then trash the formula
cell.
 

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