Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
If cell contains a pattern delete the row
I would like to delete a row if a cell (say "F") contains a
certain pattern (say "abc"). Example: If cell F of row 125 is "bcabcdd" it should be deleted. How can this be done? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
If cell contains a pattern delete the row
When you say delete the row, if you mean delete the contents then use option
1 below, if you mean delete the contents and remove the space created use option 2. ' option 1 If Range("F125") = "bcabcdd" Then Rows(125).ClearContents 'option 2 If Range("F125") = "bcabcdd" Then Rows(125).Delete Shift:=xlUp -- Cheers Nigel "John Smith" wrote in message ... I would like to delete a row if a cell (say "F") contains a certain pattern (say "abc"). Example: If cell F of row 125 is "bcabcdd" it should be deleted. How can this be done? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
If cell contains a pattern delete the row
If Range("F2").Value Like "*abc*" Then
Range("F2").EntireRow.Delete End If -- HTH Bob Phillips "John Smith" wrote in message ... I would like to delete a row if a cell (say "F") contains a certain pattern (say "abc"). Example: If cell F of row 125 is "bcabcdd" it should be deleted. How can this be done? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
removing cell pattern | Excel Discussion (Misc queries) | |||
How to find & delete a particular pattern of text from values of a | Excel Discussion (Misc queries) | |||
Cell pattern | Excel Discussion (Misc queries) | |||
Cell pattern | Excel Discussion (Misc queries) | |||
Cell Pattern | Excel Discussion (Misc queries) |