Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Do loop to find text and add verbiage if found in another column

Status
Not open for further replies.

corbinap

Programmer
Nov 20, 2006
34
US
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
 
 https://files.engineering.com/getfile.aspx?folder=74a5c7aa-d233-4e7e-9b3c-5dfef80a280f&file=example.xlsx
Here's you workbook back with 2 simple formulas.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein

You Matter...
unless you multiply yourself by the speed of light squared, then...
You Energy!
 
 https://files.engineering.com/getfile.aspx?folder=cb635ebd-6598-49f3-904c-d878d213d204&file=example_3.xlsx
Thank you but I need an array and have reposted also as need more help. Thx
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top