Solved

Clear cell with pattern

Posted on 2013-05-15
5
228 Views
Last Modified: 2013-05-16
Is there a way to search every cell containing [pattern] and clear it if the pattern exists?  Searching on this topic has been fruitless for me ... many ways to delete the entire row or filter out the row but I just want to clear contents of a cell if it contains pattern "xyx" anywhere in it.
0
Comment
Question by:avatech
  • 2
  • 2
5 Comments
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 39169720
Try this

Select your data
From the ribbon menu select    Data > Filter
From the dropdown at the top of the column
    Select Text filters
    Select contains
    Type your pattern
    Click OK
Now you have a list with the pattern visible
Select this pattern and press the delete key
0
 
LVL 19

Expert Comment

by:helpfinder
ID: 39170670
what if you select range where you want to look for a pattern. Then you do Replace (Ctrl+H) and and type in "Find what" your pattern and "Replace with" will be empty, then just click "Replace all"
0
 
LVL 4

Author Comment

by:avatech
ID: 39171186
The find/replace only works for what is is explicitly found and not empty the whole cell.  I"ll try the filter idea and see how well that works.
0
 
LVL 19

Accepted Solution

by:
helpfinder earned 250 total points
ID: 39171227
OK, let say you want to clear cell if it contains word "text", but in your cell it looks like "this_is_text".
so what if you use Replace (Ctrl+H) but do not define "Find what" like "text" but "*text*"
0
 
LVL 4

Author Closing Comment

by:avatech
ID: 39171453
Genius!  I'm embarrassed I hadn't thought of pattern matching with wildcards ... thank you.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now