Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete rows with common element
Hello,
Is there a way to delete all rows that contain a common text element (i.e. "Holiday"). The remaining information in the records may differ from every other row.-- Thank-you and all suggestions are appreciated. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete rows with common element
yes. More info. where in the row? Only the word in the cell or holiday sss
in the same cell? -- Don Guillett SalesAid Software "Anauna" wrote in message ... Hello, Is there a way to delete all rows that contain a common text element (i.e. "Holiday"). The remaining information in the records may differ from every other row.-- Thank-you and all suggestions are appreciated. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete rows with common element
Try bellow code:- Sharad Sub DelRows() Dim uRange As Range, delRange As Range Set uRange = Worksheets("Sheet_Name_Here").UsedRange Set delRange = uRange.Cells(uRange.Rows.Count + 1, 1).EntireRow For Each c In uRange.Cells If InStr(1, c.Value, "Holiday") 0 Then Set delRange = Union(delRange, c.EntireRow) End If Next c delRange.Delete End Sub *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete rows with common element
The text to be used as the "trigger" is located in Column B for each record.
If the key text phrase is located in this cell I would like the entire record (row) to be deleted. I have tried the advanced filter but it requires all the each record to be identical. Thank-you "Don Guillett" wrote: yes. More info. where in the row? Only the word in the cell or holiday sss in the same cell? -- Don Guillett SalesAid Software "Anauna" wrote in message ... Hello, Is there a way to delete all rows that contain a common text element (i.e. "Holiday"). The remaining information in the records may differ from every other row.-- Thank-you and all suggestions are appreciated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
ADDING COLUMNS FOR COMMON ROWS | Excel Discussion (Misc queries) | |||
Sum Value of rows based on two common fields | Excel Worksheet Functions | |||
Comparing two different sets of data with common element | Excel Worksheet Functions | |||
Common Spacing of Rows | Excel Worksheet Functions | |||
Deleting rows containing common data | Excel Discussion (Misc queries) |