Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
Actually, Sheet4.Range("C4") is legal syntax, it means the code name for the sheet is Sheet4. If you are trying to delete all rows in which an entry in a single column equals the entry in C4 then you can do this very fast using the following code: Sub DeleteMatches() Application.ScreenUpdating = False Columns("A:A").Insert Range("A1:A" & [B65536].End(xlUp).Row).Select Selection = "=IF(RC[1]=R4C4,1,""N"")" Selection.SpecialCells(xlCellTypeFormulas, 1).EntireRow.Delete Columns("A:A").Delete End Sub In this example it is assumed that the range where the items you want to find are located in column B If this helps, please click the Yes button. cheers, Shane Devenshire "jlclyde" wrote in message ... I am trying to use Select Case. Sheet4.Range("C4") = 103, 113, 123, 220 and so on. I am trying to look up all of the i's in Rng and determine if any of them are = to Sheet4.Range("C4"). this is the code I have. It does not work as is. Thanks, Jay For Each i In Rng Select Case i Case Sheet4.Range("C4") i.EntireRow.Delete End Select Next i |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Select case | Excel Discussion (Misc queries) | |||
Case Select | Excel Worksheet Functions | |||
Case without Select Case error problem | Excel Discussion (Misc queries) | |||
Select Case | Excel Discussion (Misc queries) | |||
Need help on Select Case | Excel Worksheet Functions |