Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 3
Default Delete certain text from cells

I have a column of data (50 cells), with some cells blank. In certain of the cells, there is a dash that separates the first word in the cell, and the remaining letters/text (actually it is a blank/-/blank). I would like VBA that would delete everything after the first word in the cell (and this word can vary in length). Any ideas?
Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,872
Default Delete certain text from cells

Hi,

Am Wed, 30 Jan 2013 18:12:03 +0000 schrieb ukat101052:

I have a column of data (50 cells), with some cells blank. In certain
of the cells, there is a dash that separates the first word in the cell,
and the remaining letters/text (actually it is a blank/-/blank). I
would like VBA that would delete everything after the first word in the
cell (and this word can vary in length). Any ideas?


home tab = Find & Select = Replace
Find what: blank-blank*
Replace with: Nothing


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #3   Report Post  
Junior Member
 
Posts: 3
Default

Thanks Claus-works beautifully!
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete Certain Text From Cells Adding Text Without Deleting[_2_] Excel Discussion (Misc queries) 2 June 8th 09 06:45 AM
how can I delete cells containing text within a range of cells jackwmbg Excel Discussion (Misc queries) 2 June 6th 08 09:08 PM
Delete Repeating text in cells Don B Excel Discussion (Misc queries) 2 September 3rd 06 10:24 PM
macro to select cells containing specific text and delete all cells but these JenIT Excel Programming 3 March 27th 06 10:07 PM
Delete text in cells but keep formula YanYan Excel Worksheet Functions 4 December 1st 05 02:08 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"