indi visual
Member
I was looking to check if any one word in a group of words exists in range, and then manually revise each of them one by one in a userform pop up box. I know how to structure the buttons to "skip" and "enter" whatever changes the user makes in the text box fields -back to the worksheet, I'm just not sure how to make sure this code works so that it runs through each of the found specified words to manually revise if necessary.
Also, I thought it would be a good idea to count the total number of specified words and add them to a "this many remaining" counter on the userform.
Beneath is simply a non-working example:
Sub Check_If_Specified_Words_Exist_And_Count_How_Many()
Application.ScreenUpdating = False
''''''''''''''''''''''''''''''''''''''
Dim C As Range
Dim SpecifiedWords As String
''''''''''''''''''''''''''''''''''''''
Set MyRange = Range("A2:A" & Range("A" & Rows.Count).End(xlUp).Row)
For Each Cell In MyRange
SpecifiedWords = "Raphael___Leonardo___Michelangelo___Donatello___Casey Jones___April O'Neil"
If C Like SpecifiedWords Then
C.Value = UserForm_ManualRevise_TextBox1.Text
Application.WorksheetFunction.CountIf(MyRange, SpecifiedWords) = UserForm_Revision_Needed_Remaining_TextBox3.Text
End If
For i = 1 To Len(SpecifiedWords)
Next i
Next C
''''''''''''''''''''''''''''''''''''''
Application.ScreenUpdating = True
End Sub
Also, I thought it would be a good idea to count the total number of specified words and add them to a "this many remaining" counter on the userform.
Beneath is simply a non-working example:
Sub Check_If_Specified_Words_Exist_And_Count_How_Many()
Application.ScreenUpdating = False
''''''''''''''''''''''''''''''''''''''
Dim C As Range
Dim SpecifiedWords As String
''''''''''''''''''''''''''''''''''''''
Set MyRange = Range("A2:A" & Range("A" & Rows.Count).End(xlUp).Row)
For Each Cell In MyRange
SpecifiedWords = "Raphael___Leonardo___Michelangelo___Donatello___Casey Jones___April O'Neil"
If C Like SpecifiedWords Then
C.Value = UserForm_ManualRevise_TextBox1.Text
Application.WorksheetFunction.CountIf(MyRange, SpecifiedWords) = UserForm_Revision_Needed_Remaining_TextBox3.Text
End If
For i = 1 To Len(SpecifiedWords)
Next i
Next C
''''''''''''''''''''''''''''''''''''''
Application.ScreenUpdating = True
End Sub