- ©«¤l
- 119
- ¥DÃD
- 39
- ºëµØ
- 0
- ¿n¤À
- 164
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- office 2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-11-1
- ³Ì«áµn¿ý
- 2019-2-21
|
Sub Ex()
Dim rng As Range, ctn As Range
Dim typ As String, amt As Double
[A23:F35].Clear
typ = "": amt = 0
[E53:E60] = 0
Set ctn = [A23]
For Each rng In Range("C3", [C3].End(xlDown))
If rng = [C20] Then
If typ = "" Then typ = rng.Offset(, 1)
ctn = rng.Offset(, -2) ' ¤é´Á
ctn.Offset(, 1) = rng.Offset(, 3) ' «~¦W
ctn.Offset(, 2) = rng.Offset(, 5) ' ¥ó¼Æ
ctn.Offset(, 3) = rng.Offset(, 6) ' Ǧq
ctn.Offset(, 4) = rng.Offset(, 7) ' ³æ»ù
ctn.Offset(, 5) = rng.Offset(, 8) ' ª÷ÃB
amt = amt + ctn.Offset(, 5).Value
Set ctn = ctn.Offset(1)
End If
Next
[E53] = amt
[E54] = amt * IIf(typ = "½µæ", [J24].Value, [J25].Value)
[E55] = amt * IIf(typ = "½µæ", [J27].Value, [J28].Value)
[E56] = amt * IIf(typ = "½µæ", [J32].Value, [J33].Value)
[E59] = amt * IIf(typ = "½µæ", [J36].Value, [J37].Value)
[E54] = WorksheetFunction.Round([E54], 0) '¥|±Ë¤¤J
[E55] = WorksheetFunction.Round([E55], 0)
[E56] = WorksheetFunction.Round([E56], 0)
[E59] = WorksheetFunction.Round([E59], 0)
[E60] = amt - [E54].Value - [E55].Value - [E56].Value - [E59].Value
End Sub
½Ð°Ý¦pªGn§ï¤u§@¶1 ¨º«ç»ò¼g? |
|