BrianExcel
Well-known Member
- Joined
- Apr 21, 2010
- Messages
- 975
I am using the following line of code to search for the specific term "Percent WGKFailure". When I look at the value in the cell itself, there appears to be a carriage return or vbcrlf between "WGK" and "Failure", since it spans two lines.
I search for that specific term using the following:
I have tried breaking that code up into multiple iterations, including "Percent WGK" & vbcrlf & "Failure", "Percent WGK" & vbnewline & "Failure", etc.
For some reason the code won't find that term. I would use just the "Percent WGK", but there is another column with that in it that can't be deleted.
Any idea how I can modify that particular line to look for the right combination?
I search for that specific term using the following:
VBA Code:
Set fnd = .Cells.Find("Percent WGKFailure", LookIn:=xlValues, LookAt:=xlWhole)
I have tried breaking that code up into multiple iterations, including "Percent WGK" & vbcrlf & "Failure", "Percent WGK" & vbnewline & "Failure", etc.
For some reason the code won't find that term. I would use just the "Percent WGK", but there is another column with that in it that can't be deleted.
Any idea how I can modify that particular line to look for the right combination?