Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim rng as Range
Dim sItem as String Dim res as Variant do until len(Trim(sItem)) 0 sItem = InputBox("Input Serial Number:") Loop With Worksheets("Sheet2") set rng = .Range( _ .Cells(2,1),.Cells(rows.count,1).end(xlup)) End With res = Application.Match(sItem, rng, 0) if not iserror(res) then rng(res).EntireRow.Delete End if if the serial number and values in Column A of sheet2 will be numeric change res = Application.Match(clng(sItem), rng, 0 ) -- Regards, Tom Ogilvy Piet Lauwen wrote in message ... Hi group, I am working on this macro now for some days now but with no succes.... From Worksheet3 I ask input for an "Item" (f.i. serialnumber) with an input box. The "item" has to be found in the first collumn of a database in Worksheet2. When the "Item" is found the complete row where it is foud should be deleted. What approach should I take? Thanks in Adavance, Piet Lauwen e-Mail: |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
find and delete rows macro | Excel Discussion (Misc queries) | |||
find last record in macro and delete all after | Excel Discussion (Misc queries) | |||
Macro to find and delete rows! | Excel Discussion (Misc queries) | |||
Can't find macro in an Excel file to delete it | Excel Discussion (Misc queries) | |||
Macro to find and delete all FALSE statements | Excel Discussion (Misc queries) |