-1
2つのExcelファイルを比較するスクリプトを作成しています。2つのExcelファイルを比較するスクリプトが動作しない
私は(ループのために何が、方法は遅くするように6450行の長さ)私が探してきた
を、私は2番目のブック内で検索したい参照を取得しないように最初のワークブック内のループのために使用しています
For i = 7 to numLines ''numLines is the number of used lines of the first workbook
If '''test to get out of the LOOP
objExcel.Workbooks(Str1).Sheets(1).Range("D"&i)="" AND objExcel.Workbooks(Str1).Sheets(1).Range("H"&i)="" AND objExcel.Workbooks(Str1).Sheets(1).Range("L"&i)="" Then
i = numLines
Else '' here i get the reference (the 6 first digits of the first workbook and I try to find it in the second)
If objExcel.Workbooks(Str1).Sheets(1).Range("D"&i)<>"" Then
Reference = Mid(objExcel.Workbooks(Str1).Sheets(1).Range("D"&i),1,6)
Set table_lookup = objExcel.Workbooks(Str1).Sheets(1).Range("C1:C" & numLines2)
cell = objExcel.Workbooks(Str2).WorksheetFunction.vlookup(Reference, table_lookup, 0, False)
MsgBox cell.row
MsgBox cell.column
End If
End If
Next
問題を解決するための適切なガイダンスを提供するために、取得したエラーの説明または予想される動作を追加してください。 – sirandy