|
- ARX = Split("10,12,14,16,18", ",")
- BRX = Split("1.1,1.2,1.3,1.4,1.5", ",")
- FileArr = FileAllArr(ThisWorkbook.Path, "*.xls?", ThisWorkbook.Name, True, False) '//含子文件夹;文件路径
- If FileArr(I) <> "" Then
- For I = 0 To UBound(FileArr)
- Set WB = Workbooks.Open(FileArr(I)) '//打开文件
- Set SHW = WB.Worksheets(1)
- For IROW = 6 To SHW.Range("B65536").End(3).Row
- For X = 0 To UBound(ARX)
- If Len(SHW.Cells(IROW, Val(ARX(X))).Value) > 0 Then '
- SHW.Cells(IROW, Val(ARX(X))).Value = SHW.Cells(IROW, Val(ARX(X))).Value * Val(BRX(X))
- End If
- Next
- Next
- WB.Close True
- Next
- End If
复制代码 |
|