製品名称 = "製品名XXXXX ?" という " ?" という不思議なゴミコード
replace("製品名XXXXX ?","?","") が効かない
replace("製品名XXXXX ?","vblf","") も効かない
WorksheetFuntion.clear("製品名XXXXX ?") も効かない
なので、Vlookupとか検索できない。
見つけました。
vbFromUnicode | 128 | 文字列をUnicodeからシステムの既定のコードページに変換します |
Function orderbyitemV2(ByVal strLine, ByVal item As String) As String
Dim strWS As String
Dim R As Long
Dim btmR As Long
On Error GoTo myErr
strWS = "myLineZZ"
With P_oWB.Sheets(strWS)
btmR = .Cells(10000, "F").End(xlUp).Row
For R = 11 To btmR
If StrConv(item, vbFromUnicode) = StrConv(.Cells(R, "L").Value, vbFromUnicode) Then
orderbyitemV2 = .Cells(R, "I").Value
Exit For
End If
Next R
End With
GoTo myExit
myErr:
myExit:
End Function