Thanks in advance to anyone that can offer me assistance in trying to figure this out. I have been searching for awhile now and cannot seem to get this to work.
End Goal: Search column O (dynamic dataset) for the word/value "Review", if found in any row, throw the user a message box with the cell address of that row(s). If the word/value "Review" is not found in column O then the message box would read "No Errors Founds".
So if "Review" is found in the column the message box would read as:
- "Errors found in row(s) 13, 38, 55. Please review your entries."
Code Developed Thus Far:
I know there are a bunch of errors in this code right now. Such as the syntax for citing the row, the lack of ability to throw up the positive message if no errors are found, the layout of how I am using the messagebox.
Again, I really appreciate any help that can be provided.
THANKS IN ADVANCE!</cell></cell.row>
End Goal: Search column O (dynamic dataset) for the word/value "Review", if found in any row, throw the user a message box with the cell address of that row(s). If the word/value "Review" is not found in column O then the message box would read "No Errors Founds".
So if "Review" is found in the column the message box would read as:
- "Errors found in row(s) 13, 38, 55. Please review your entries."
Code Developed Thus Far:
Code:
Dim TestCell As Range Dim MsgReview As String
Dim MsgGood As String
MsgReview = "Error found in row(s) <cell.row>, please review your entries"
MsgGood = "No errors found"
Application.ScreenUpdating = False
For Each TestCell In [O1].EntireColumn.Cells
' break on first find
If TestCell = "Review" Then
MsgBox Replace(MsgReview, "<cell>", .Row.Address)
Exit For
'msg = msg & "Errors Found in " & cell.Address(False, False) & " please review your entries" & vbNewLine
Exit For
End If
Next TestCell
Application.ScreenUpdating = True
I know there are a bunch of errors in this code right now. Such as the syntax for citing the row, the lack of ability to throw up the positive message if no errors are found, the layout of how I am using the messagebox.
Again, I really appreciate any help that can be provided.
THANKS IN ADVANCE!</cell></cell.row>