Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Newsgroup Archive
Excel Newsgroups
Excel Programming
Adding An If Clause after Prompt
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="JLGWhiz, post: 6390143"] I did not test this, but it should work. Use the Select Case to test the value in column B. Sheets("list").Select Range("C3").Select Cells.Find(What:=sUsername, After:=ActiveCell, LookIn:=xlFormulas, LookAt _ :=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _ False, SearchFormat:=False).Select Answer = MsgBox("Is this the contract/vendor you would like to delete?", vbYesNo + vbInformation, "Please Confirm") If Answer = vbYes Then Select Case LCAse(Range("B" & Selection.Row).Value) Case "monthly" Selection.Resize(12, 1).EntireRow.Delete Case "quarterly" Selection.Resize(3, 1).EntireRow.Delete Case "yearly" Selection.EntireRow.Delete End Select Exit Sub Else Cells.Find(What:=sUsername, After:=ActiveCell, LookIn:=xlFormulas, LookAt _ :=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _ False, SearchFormat:=False).Activate End If [/QUOTE]
Verification
Post reply
Forums
Archive
Newsgroup Archive
Excel Newsgroups
Excel Programming
Adding An If Clause after Prompt
Top