May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.
Private Sub btnProcess_Click() Dim strPercent2 As String strPercent2 = Me.txtPercentage.Value Dim sngPercent2 As Single Dim strSearch As String If IsNumeric(strPercent2) Then sngPercent2 = CSng(strPercent2) Do While sngPercent2 > 0.1 strSearch = CStr(sngPercent2) Dim i As Long i = 1 Do Until i > Cells(65536, "a").End(xlUp).Row If InStr(Trim(Cells(i, "a").Value), strSearch) > 0 Then Rows(i - 1 & ":" & i + 3).delete Else i = i + 1 End If Loop MsgBox CStr(sngPercent2) Application.ScreenUpdating = True sngPercent2 = sngPercent2 - 0.1 Loop Else End If End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|Characters in .xlsb filename cause macro association to be lost (Error 1004)||2||21|
|copy down array||24||36|
|replace blank cells with 0 starting with a specific column until no more data Excel VBA||2||9|
Join the community of 500,000 technology professionals and ask your questions.