Do loop to find text in row and add verbiage in column based on value.
Hi and thanks in advance. I am looking for a way if a word is found in a row then a value under the row will be moved to a column
example and see attached.
If "Stock" is found in column B row and column C shows "Good"
then add "Ready" in column E
else Not Ready
______________________________________
Found this code that might help with first piece
Sub Test3()
Dim x As String
Dim found As Boolean
' Select first line of data.
Range("A2").Select
' Set search variable value.
x = "Stock"
' Set Boolean variable "found" to false.
found = False
' Set Do loop to stop at empty cell.
Do Until IsEmpty(ActiveCell)
' Check active cell for search value.
If ActiveCell.Value = x Then
found = TRUE
Exit Do
End If
' Step down 1 row from present location.
ActiveCell.Offset(1, 0).Select
Loop
End Sub
Hi and thanks in advance. I am looking for a way if a word is found in a row then a value under the row will be moved to a column
example and see attached.
If "Stock" is found in column B row and column C shows "Good"
then add "Ready" in column E
else Not Ready
______________________________________
Found this code that might help with first piece
Sub Test3()
Dim x As String
Dim found As Boolean
' Select first line of data.
Range("A2").Select
' Set search variable value.
x = "Stock"
' Set Boolean variable "found" to false.
found = False
' Set Do loop to stop at empty cell.
Do Until IsEmpty(ActiveCell)
' Check active cell for search value.
If ActiveCell.Value = x Then
found = TRUE
Exit Do
End If
' Step down 1 row from present location.
ActiveCell.Offset(1, 0).Select
Loop
End Sub