Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deleting first word in cells 1

Status
Not open for further replies.

kwuk

Technical User
Joined
Sep 30, 2003
Messages
14
Location
GB
Hi,

I have a excel spreadsheet in which each cell has information i want to keep, except for the first word in each cell which i want deleted.

i.e.

'An example cell' - I would want the word 'An' removed.

The word in each cell is different in each cell, so i cant just simply delete any instance of any particular one.

Any ideas how I can do this?

Thanks
 
Convert the Column containing data to Columns using "text to columns" - with space as a delimiter.
Delete the first column after the event, then re-concatenate format like B1&C1&D1 [and so on down the column] afterwards, copy it onto itself as "Values" and delete the working columns.

 
As we are in VBA forum, you may play with something like this:
For Each c In YourRangeOfInterest
a = Split(c.Text)
a(0) = ""
c.Text = Join(a)
Next c
If your version of Excel don't like Split/Join functions, you may consider InStr and Mid.

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Excellent! And so simple too. I had never seen the text to columns feature before.

Have a star.
 
Thanks to PHV also, that could come in handy for future use.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top