Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
Sub ABConly()
Dim lastrow lastrow = Cells(Rows.Count, "a").End(xlUp).Row For r = lastrow To 1 Step -1 Cells(r, "A").Select If Selection.Value = "A" Then GoTo 100 ElseIf Selection.Value = "B" Then GoTo 100 ElseIf Selection.Value = "C" Then GoTo 100 Else Selection.EntireRow.Delete End If 100 Next r End Sub Vaya con Dios, Chuck, CABGx3 "Sowparnicka" wrote: Hi, Am having one excel sheet contains more records(rows as well as columns) say A to z in the specific column i want only A B C in that column Rest all should be deleted along with the Row. Can you pls send the code for this it will be more effective for my official use. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2007 macros - how to merge 5 macros together into one | Excel Discussion (Misc queries) | |||
Macros warning always shows up, even if all macros removed | Excel Discussion (Misc queries) | |||
Macros - copying macros from one computer to another | Excel Discussion (Misc queries) | |||
Training: More on how to use macros in Excel: Recording Macros | Excel Worksheet Functions | |||
help with excel (maybe macros) | Excel Worksheet Functions |