Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Being in either Column A or B is not a problem. Give this macro a try...
Sub ClearResponseRows() Dim X As Long, WS As Worksheet, Response As String, S() As String Response = UCase(InputBox("Enter value")) If Response = vbNullString Then Exit Sub S = Split("Sheet1,Sheet2,Sheet3,Sheet4,Sheet5", ",") On Error GoTo NotFound For X = 0 To UBound(S) Worksheets(S(X)).Range("A:B").Find(What:=Response, LookIn:=xlValues, _ LookAt:=xlWhole, MatchCase:=False).EntireRow.Delete Next NotFound: End Sub Note: If you need to change the sheet names this macro applies to, you would change the obvious text String argument to the Split function (4th statement in the macro)... the text is comma delimited with no spaces around the commas. -- Rick (MVP - Excel) "PVANS" wrote in message ... Hi Mike, There will only be one instance of this value However, it won't necessariliy be on the same row on all sheets. I can make it so it is definitely in column B not Column A or B if that makes it easier "Mike H" wrote: Will it be on the same row in all sheets? Could there be multiple instances of the value been sought? -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "PVANS" wrote: Good Afternoon all, Wonder if someone could give me a suggestion here - I have multiple worksheets in a workbook. What I would like to do is have the user type in a value into an input box, and if that value is found either in column A or column B on Sheet1,Sheet2,Sheet3,Sheet4,Sheet5 (if its on one, it will be on all 5) for it to delete the entire row. Can this be done? if so, please could you suggest a method Thanks so much, I appreciate the assistance. Regards, Paul |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
vba to delete specific name from Name Manager | Excel Programming | |||
Delete Specific Sheets | Excel Programming | |||
Macro to delete specific rows in different worksheets | Excel Programming | |||
print specific worksheets in specific order. | Excel Programming |