Macro:- Deleting rows on condition for selected no of col.
Closed
ShridharSahu
TrowaD
- Posts
- 1
- Registration date
- Sunday October 5, 2014
- Status
- Member
- Last seen
- October 5, 2014
TrowaD
- Posts
- 2880
- Registration date
- Sunday September 12, 2010
- Status
- Moderator
- Last seen
- May 2, 2022
Related:
- Macro:- Deleting rows on condition for selected no of col.
- Excel macro delete row if cell contains value ✓ - Forum - Excel
- Macro to delete row after certain condition found ✓ - Forum - Excel
- Excel - A macro to change the color of row on condition - How-To - Excel
- Macros to Delete Rows in Excel 2007 ✓ - Forum - Programming
- Macro to compare and delete rows ✓ - Forum - Excel
1 reply
TrowaD
Oct 6, 2014 at 11:32 AM
- Posts
- 2880
- Registration date
- Sunday September 12, 2010
- Status
- Moderator
- Last seen
- May 2, 2022
Oct 6, 2014 at 11:32 AM
Hi ShridharSahu,
Your screen capture is a little too big to fit in a thread. This makes it very hard to read.
You say you want to delete rows which contains a "n", but only for a particular number of columns. Since you didn't specify the range try this example:
When a "n" is found in the range A1:F20 then the columns A:F of that particular row will be deleted.
Best regards,
Trowa
Your screen capture is a little too big to fit in a thread. This makes it very hard to read.
You say you want to delete rows which contains a "n", but only for a particular number of columns. Since you didn't specify the range try this example:
Sub RunMe() For Each cell In Range("A1:F20") If cell.Value = "n" Then Range(Cells(cell.Row, "A"), Cells(cell.Row, "F")).Delete Next cell End Sub
When a "n" is found in the range A1:F20 then the columns A:F of that particular row will be deleted.
Best regards,
Trowa