- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 257
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-11-27
|
¥»©«³Ì«á¥Ñ Hsieh ©ó 2013-1-8 00:09 ½s¿è
¦^´_ 5# tmde987 - Sub «ö¶s_1()
- Dim Ar()
- Set d = CreateObject("Scripting.Dictionary")
- With Sheet1
- For Each a In .Range(.[A2], .[A2].End(xlDown))
- d(a.Value) = a.Offset(, 4).Value
- Next
- For Each a In .Range(.[J2], .[J2].End(xlDown))
- i = a.Offset(, 4).Value - d(a.Value)
- If i <> 0 Then
- ReDim Preserve Ar(s)
- Ar(s) = Array(a.Value, a.Offset(, 1).Value, a.Offset(, 2).Value, a.Offset(, 3).Value, i, a.Offset(, 5).Value)
- s = s + 1
- End If
- Next
- End With
- Sheet2.UsedRange.Offset(1) = "" '²Ä2¦C¥H¤U§R°£
- Sheet2.[A2].Resize(s, 6) = Application.Transpose(Application.Transpose(Ar)) 'A2¥H¤U¶ñ¤J
- End Sub
½Æ»s¥N½X- Sub «ö¶s_2()
- Dim Ar()
- Set d = CreateObject("Scripting.Dictionary")
- With Sheet1
- For Each a In .Range(.[A2], .[A2].End(xlDown))
- d(a.Value) = a.Offset(, 4).Value
- Next
- For Each a In .Range(.[J2], .[J2].End(xlDown))
- i = a.Offset(, 4).Value - d(a.Value)
- If i <> 0 Then
- ReDim Preserve Ar(s)
- Ar(s) = Array(a.Value, a.Offset(, 1).Value, a.Offset(, 3).Value, i)
- s = s + 1
- End If
- Next
- End With
- Sheet3.UsedRange.Offset(1) = "" '²Ä2¦C¥H¤U§R°£
- Sheet3.[A2].Resize(s, 4) = Application.Transpose(Application.Transpose(Ar)) 'A2¥H¤U¶ñ¤J
- End Sub
½Æ»s¥N½X- Sub «ö¶s_3()
- Dim Ar()
- Set d = CreateObject("Scripting.Dictionary")
- With Sheet1
- For Each a In .Range(.[A2], .[A2].End(xlDown))
- d(a.Value) = a.Offset(, 4).Value
- Next
- For Each a In .Range(.[J2], .[J2].End(xlDown))
- i = a.Offset(, 4).Value - d(a.Value)
- If i <> 0 Then
- ReDim Preserve Ar(s)
- Ar(s) = Array(a.Value, a.Offset(, 1).Value, a.Offset(, 3).Value, i)
- s = s + 1
- End If
- Next
- End With
- Sheet4.UsedRange.Offset(2) = "" '²Ä3¦C¥H¤U§R°£
- Sheet4.[A3].Resize(s, 4) = Application.Transpose(Application.Transpose(Ar)) 'A3¥H¤U¶ñ¤J
- End Sub
½Æ»s¥N½X- Sub «ö¶s_4()
- Dim Ar()
- Set d = CreateObject("Scripting.Dictionary")
- With Sheet1
- For Each a In .Range(.[A2], .[A2].End(xlDown))
- d(a.Value) = a.Offset(, 4).Value
- Next
- For Each a In .Range(.[J2], .[J2].End(xlDown))
- i = a.Offset(, 4).Value - d(a.Value)
- If i <> 0 Then
- ReDim Preserve Ar(s)
- Ar(s) = Array(a.Value, a.Offset(, 1).Value, a.Offset(, 2).Value, a.Offset(, 3).Value, i, "=RC[-2]*RC[-1]")
- s = s + 1
- End If
- Next
- End With
- Sheet5.UsedRange.Offset(2) = "" '²Ä3¦C¥H¤U§R°£
- Sheet5.[A3].Resize(s, 6) = Application.Transpose(Application.Transpose(Ar)) 'A3¥H¤U¶ñ¤J
- End Sub
½Æ»s¥N½X- Sub «ö¶s_5()
- Dim Ar()
- With Sheet6
- For Each a In .Range(.[A2], .[A2].End(xlDown))
- i = Application.Max(0, a.Offset(, 5).Value - a.Offset(, 4).Value) 'pºâÁʶR¼Æ¶q
- ReDim Preserve Ar(s)
- Ar(s) = Array(a.Value, a.Offset(, 1).Value, a.Offset(, 2).Value, a.Offset(, 3).Value, i)
- s = s + 1
- Next
- End With
- Sheet6.UsedRange.Offset(2, 8) = "" 'I3¥H¤U§R°£
- Sheet6.[I3].Resize(s, 5) = Application.Transpose(Application.Transpose(Ar)) 'I3¥H¤U¶ñ¤J
- End Sub
½Æ»s¥N½X |
|