Help with .Find (1 Viewer)

Speiro1

New member
Local time
Today, 04:53
Joined
May 2, 2017
Messages
4
Hi I am trying to manipulate some code to "Find" two possible characters. Originally the code was only looking to find "L", however it has been determined that in some instances only an "S" may appear. Below is the original code and what I expected to the code to look like but clearly it is wrong. I colored my modification in red. I tried to scour the boards for a solution but could not find one.

Original Code
RowNo = objExcel.Range("B1:B" & lastrow2).Find(what:="L", lookat:=xlWhole).Row - 1

Modified Code but not working
RowNo = objExcel.Range("B1:B" & lastrow2).Find(what:="L" or "S", lookat:=xlWhole).Row - 1

Any help would be greatly appreciated. :banghead:
 

Users who are viewing this thread

Top Bottom