Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Joel,
'----------------- You have to consider if the CASE makes a difference in you text. You may want to force all text to uppercase before you do a comparison. Instr is case sensitive, while using "=" is not case sensitive. '----------------- Try: '============= Public Sub Tester() Dim iPos As Long Dim jPos As Long Const sStr As String = "A CAT AND A DOG" Const sStr2 As String = "cat" iPos = InStr(1, sStr, sStr2, vbTextCompare) jPos = InStr(1, sStr, sStr2, vbBinaryCompare) MsgBox Prompt:="vbTextCompa " & iPos _ & vbNewLine _ & "vbBinaryCompare : " & jPos End Sub '<<============= --- Regards, Norman |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find specific info using search string using VBA | Excel Discussion (Misc queries) | |||
Easiest way to find differences between Rows? | Excel Discussion (Misc queries) | |||
Search/Match/Find ANY part of string to ANY part of Cell Value | Excel Worksheet Functions | |||
FIND / SEARCH text compare cell to string in 3rd cell | Excel Discussion (Misc queries) | |||
search a string withing a string : find / search hangs | Excel Programming |