Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Dim FoundCell as Range
with Worksheets("Top10Month") set foundcell = .cells.find(What:="800411", After:=ActiveCell, _ LookIn:=xlFormulas, LookAt:=xlPart, _ SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False) if foundcell is nothing then 'not found else foundcell.entirerow.delete end if end with Heather O'Malley wrote: I am trying to find and delete specific rows in a spreadsheet, however the reference Im looking for e.g. 800411 is not always going to be in the spreadsheet, so my macro is not working on all occasions €“ any ideas how I can overcome this. Macro so far: Sheets("top10month").SelectCells.Find(What:="80041 1", After:=ActiveCell, LookIn:=xlFormulas, LookAt _ :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _ False, SearchFormat:=False).Activate ActiveCell.Rows("1:1").EntireRow.Select Application.CutCopyMode = False Selection.Delete Shift:=xlUp ActiveCell.Select Any help is appreciated this is a great forum for beginners like me! Thanks -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
delete pictures with a macro | Excel Discussion (Misc queries) | |||
Can't find macro in an Excel file to delete it | Excel Discussion (Misc queries) | |||
How do I find duplicate rows in a list in Excel, and not delete it | Excel Discussion (Misc queries) | |||
Macro data selection line delete | Excel Discussion (Misc queries) | |||
Macro to find and delete all FALSE statements | Excel Discussion (Misc queries) |