Thread: Text Comparison
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
jd jd is offline
external usenet poster
 
Posts: 91
Default Text Comparison

For X = 1 to len(Cells(1,1))-1 step 1

If Mid(Cells(1,1),X,2) = "LA" then
MyString = Cells(1,1).value
Exit for
End If

Next

"bilswi" wrote:


I have a need to test the cell contents to determine if the cell
contains specific text in any of its contents. This is like using the
"find" feature.

I want to test if a cell contains "LA" for instance. If true then I
want to copy the entire cell and then compare it to another cell.

Any help?

Thanks Bill


--
bilswi
------------------------------------------------------------------------
bilswi's Profile: http://www.excelforum.com/member.php...o&userid=16129
View this thread: http://www.excelforum.com/showthread...hreadid=275673