Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hello All,
How do I delete (for an entire worksheet) rows that contain "N"? The cells are "B and "C". If "B" and "C" contain the letter "N" delete the entire row? The letter "N" is the only thing in the cell. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
You could put an auto filter on columns B & C and filter both for "N". The results would be only the rows containing N in both B & C. Then highlight the row numbers and press Ctrl - (Ctrl + Minus). -- Thanks, Shane Devenshire Microsoft Excel MVP "Red2003XLT" wrote: Hello All, How do I delete (for an entire worksheet) rows that contain "N"? The cells are "B and "C". If "B" and "C" contain the letter "N" delete the entire row? The letter "N" is the only thing in the cell. |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Sub DeleteRows_2Params()
'Bob Phillips Aug. 26, 2006 'Revised Gord Dibben April 30, 2008 Dim iLastRow As Long Dim i As Long iLastRow = Cells(Rows.Count, "B").End(xlUp).Row For i = iLastRow To 1 Step -1 If Cells(i, "B").Value = "N" And _ Cells(i, "C").Value = "N" Then Rows(i).Delete End If Next i End Sub Gord Dibben MS Excel MVP On Wed, 30 Apr 2008 07:48:00 -0700, Red2003XLT wrote: Hello All, How do I delete (for an entire worksheet) rows that contain "N"? The cells are "B and "C". If "B" and "C" contain the letter "N" delete the entire row? The letter "N" is the only thing in the cell. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Delete entire row if | Excel Discussion (Misc queries) | |||
How do I delete non-printing characters from an entire worksheet? | Excel Discussion (Misc queries) | |||
CANNOT DELETE AN ENTIRE COLUMN | Excel Discussion (Misc queries) | |||
Can I delete an entire row if condition is not met? | Excel Worksheet Functions | |||
Easiest way to delete blank cells in column (not entire row) | Excel Discussion (Misc queries) |