Features of !SEMTools
↑ Navigate Excel tasks and !SEMTools add-in features ↑

Delete cells by condition in Excel

This section is devoted to situations when you need to delete the contents of cells in Excel by a certain condition.

Clear unique or repeated values in an Excel column
Clear the values that occur once, or the ones that repeat. «EMMA CLARK» counts as a repeat of «Emma Clark».
Delete cells menu on !SEMTools tab in Excel

It’s better not to rush and delete cells right away. First, use similar macros like ‘Find Cells‘ and ‘Extract Cells‘ to find and review the data you’re planning to remove.

Most often, you need to delete cell contents if they contain certain text or a list of text patterns. The tasks you need are shown in the specific menu items of the add-in:

  • Condition of containing certain words in the cells:
    • DELETE → Cells → By content → Containing words → 1 word
    • DELETE → Cells → By content → Containing words → Any from word list
  • Condition of a simple substring match:
    • Containing…
    • Starting with…
    • Ending in…

Sometimes simple patterns may not be enough, then deleting cells by matching a regular expression comes in handy.

Deleting duplicate cells in various ways is also very popular. !SEMTools allows you to:

A rather rare task is to remove cells depending on their occurrence in the column – repetitive, including the first occurence, or, conversely, not repetitive.

You may also find these instruments relevant and useful:

“Delete words” menu. Contains procedures that allows you to delete repetitive words in the same cell.

“Delete Rows” menu. Allows you to delete whole rows based on the values of the cells in the selected column.

More in this section:

See also:

Leave a Reply

Your email address will not be published. Required fields are marked *

*