|
只新增藍色部份
Sub demo()
Application.ScreenUpdating = False
Path = ThisWorkbook.Path & "\"
file = Dir(Path & "*.xlsx")
While file <> ""
Set wb = Workbooks.Open(Path & file)
[g:g] = ""
c = Range("c1:g" & [a1].End(4).Row)
For i = 1 To UBound(c)
Max = Application.Max(Application.Index(c, i, 0))
Min = Application.Min(Application.Index(c, i, 0))
If Min <> 0 Then c(i, 5) = (Max - Min) / Min
Next
[c1].Resize(i - 1, 5) = c
wb.Close 1
file = Dir()
Wend
Application.ScreenUpdating = True
MsgBox "ok"
End Sub
祝順心,南無阿彌陀佛!
|
评分
-
查看全部评分
|