View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
ppeer ppeer is offline
external usenet poster
 
Posts: 25
Default delete cell if part of cell contains

On 19 okt, 19:48, "Rick Rothstein"
wrote:
I'm pretty sure this single line of code will do what you want...

Cells.Replace "*text*", "", xlPart, xlByColumns, False

--
Rick (MVP - Excel)

"ppeer" wrote in message

...



For a worksheet I would like to check the cells if they contain the
word "text".
Within a cell this word is always combined e.g.: text 06735
When the cell contains "text" I would like to clean the whole cell, so
text including e.g: 06735.
Result: a blank cell.


Please, can somebody help me out?- Tekst uit oorspronkelijk bericht niet weergeven -


- Tekst uit oorspronkelijk bericht weergeven -


thanks, this line of code gets the job done!