- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 1# hugh0620 - Private Sub CommandButton1_Click()
- Dim st1 As String, ed1 As String '«Å§i¬°¦r¦ê
- Dim B As Range, C As Range, a As Integer, i As Integer
- a = Sheet3.Range("D65536").End(xlUp).Row '***Sheet4 DÄæ¨S¸ê®Æ A¥Ã»·¬O1
- For i = 3 To A '*** A=1 ¤£·|°õ¦æ°j°é
- '¤ë¥÷1
- If Sheet3.Range("AD" & i) = "" Then
- GoTo 1
- Else
- If Sheet3.Range("AE" & i) = "" Then
- st1 = Sheet3.Range("Z" & i) '¶Ç¦^¦r¦ê
- ed1 = Sheet3.Range("AA" & i) '¶Ç¦^¦r¦ê
- Else
- st1 = Sheet3.Range("Z" & i) '¶Ç¦^¦r¦ê
- ed1 = Sheet3.Range("AJ" & i) '¶Ç¦^¦r¦ê
- End If
-
- Set B = Sheet4.Columns("E").Find(st1, LookIn:=xlValues) 'LookIn:=xlValues ¤º®e¬°¦r¦ê
- Set C = Sheet4.Columns("E").Find(ed1, LookIn:=xlValues)
- If Not B Is Nothing And Not C Is Nothing Then 'B , C ¬Ò¶·¬°Range(¦³§ä¨ì)
- Sheet3.Range("AS" & i) = Application.Sum(Sheet4.Range(B.Offset(, 1), C.Offset(, 1)))
- End If
- End If
- 1
- Next
- End Sub
½Æ»s¥N½X |
|