|
Thanks for the scripts. After looking through them, I have a couple questions.
First, Can you please explain what the following lines do? Also, can you please explain what the $i variable is for throughout the script?
If @ERROR = 0 $RC = $objExcel.Workbooks.Open($File) While NOT $objExcel.Range("A"+($i+1)).Value = "" ReDim preserve $Values[1,$i] $Values[0,$i] = $objExcel.Range("A"+($i+1)).Value $Values[1,$i] = $objExcel.Range("B"+($i+1)).Value $i = $i + 1 Loop $i = $i - 1 $objExcel.Close
Also, please explain what this part does:
DIM $j For $j = 0 To $i Step 1 If $Values[0,$j] = $Value ? $Values[1,$j] ;Here is the value you were looking for $j = $i EndIf
Finally, how do I save/move the file to the location in column B or the second excel file. The file will need to be moved based on the corresponding value in column B. For example, the script looks in C6 in file 1 and finds that value in column A of file 2. In the row of file 2 where the data was found, column B contains the path where the file 1 should be moved.
|