Macro:- Deleting rows on condition for selected no of col.
Closed
ShridharSahu
Posts
1
Registration date
Sunday October 5, 2014
Status
Member
Last seen
October 5, 2014
-
Oct 5, 2014 at 06:45 PM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Oct 6, 2014 at 11:32 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Oct 6, 2014 at 11:32 AM
Related:
- Macro:- Deleting rows on condition for selected no of col.
- Spell number in excel without macro - Guide
- Macro excel download - Download - Spreadsheets
- Excel macro to create new sheet based on value in cells - Guide
- Run macro on opening workbook - Guide
- Excel vba assign macro to button programmatically - Guide
1 response
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Oct 6, 2014 at 11:32 AM
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