の最初のヒット
excel range.find exact match site:microsoft.com
は:
Range.Find
そこにあなたが見つけます
ルックアット タイプ: System.Object
Optional Object. Can be one of the following XlLookAt constants: xlWhole or xlPart.
LookAt リンクをたどると、次のように表示されます。
xlPart Match against any part of the search text.
xlWhole Match against the whole of the search text.
ところで: objTarget とは誰ですか?
アップデート:
コメントで言及した VBA コード スニペットを VBScriptに「移植」する必要があります (ここにいくつかのヒントがあります)。
Option Explicit
' Define Excel Consts unknown to VBScript
Const xlPart = 2
Const xlWhole = 1
Dim oExcel : Set oExcel = CreateObject("Excel.Application")
Dim oWBook : Set oWBook = oExcel.Workbooks.Open("M:\lib\kurs0705\testdata\ut.xls")
Dim oRange : Set oRange = oWBook.Sheets("NewSheet").Range("A1:A11")
' translate named args to positional args
' expression.Find(What, After, LookIn, LookAt, SearchOrder, SearchDirection, MatchCase, MatchByte)
Dim oFnd1 : Set oFnd1 = oRange.Find("Title1", , , xlPart)
WScript.Echo TypeName(oFnd1), CStr(oFnd1)
Dim oFnd2 : Set oFnd2 = oRange.Find("Title1", , , xlWhole)
WScript.Echo TypeName(oFnd2), CStr(oFnd2)
oWBook.Close
oExcel.Quit
出力:
cscript excelfind.vbs
Range Title10
Range Title1