- ©«¤l
- 1018
- ¥DÃD
- 15
- ºëµØ
- 0
- ¿n¤À
- 1058
- ÂI¦W
- 0
- §@·~¨t²Î
- win7 32bit
- ³nÅ骩¥»
- Office 2016 64-bit
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2012-5-9
- ³Ì«áµn¿ý
- 2022-9-28
|
¦^´_ 1# mice
¨Ì§Aªº¼gªkµy§@קï- Private Sub Worksheet_Change(ByVal Target As Range)
- On Error GoTo 10
- Dim i1, i2, i3, i4, i5, i6, i7 As Currency
- Dim var As Integer
- If Left(Target.Address, 2) = "$A" Then
-
- Dim funCont As String
- funCont = Trim(CStr(Target.Value))
-
- Select Case funCont
- Case "±ø¥ó1"
- var = 1
- Case "±ø¥ó2"
- var = 2
- Case "±ø¥ó3"
- var = 3
- End Select
-
- i1 = Range(Target.Address).Row
- i2 = Cells(i1, 2)
- i3 = Cells(i1, 3)
- i4 = Cells(i1, 4)
- i7 = (i2 * Cells(var + 1, 6) + i3 * Cells(var + 1, 8) + i4 - Cells(var + 1, 7))
- If i7 < 0 Then
- i7 = 0
- End If
-
- Cells(i1, 8) = i7
- End If
-
- '¿é¤J°Ï
- If Application.Intersect(Target, Range("B18:D20")) Then
- For Each result In Range("H11:H13")
- funCont = Trim(CStr(Range("A" & result.Row).Value))
-
- Select Case funCont
- Case "±ø¥ó1"
- var = 1
- Case "±ø¥ó2"
- var = 2
- Case "±ø¥ó3"
- var = 3
- End Select
-
- i1 = result.Row '§ï¬°result.row
- i2 = Cells(i1, 2)
- i3 = Cells(i1, 3)
- i4 = Cells(i1, 4)
- i7 = (i2 * Cells(var + 1, 6) + i3 * Cells(var + 1, 8) + i4 - Cells(var + 1, 7))
- If i7 < 0 Then
- i7 = 0
- End If
-
- Cells(i1, 8) = i7
- Next
- End If
-
- 10: End Sub
½Æ»s¥N½X |
|