- ©«¤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
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-4-21 06:33 ½s¿è
¦^´_ 1# luke
±N©Ò¦³ªº®Ö¨ú¤è¶ô «ü©w¥¨¶° ¬°¦¹µ{§Ç- Option Explicit
- Sub Ex()
- Dim D As Object, °Ï°ì As String, E, Check As Object
- Set D = CreateObject("Scripting.Dictionary")
- With sheet1
- Set Check = ActiveSheet.Shapes(Application.Caller).OLEFormat.Object '¿ï¨úªº ®Ö¨ú¤è¶ô
- °Ï°ì = Check.Caption '®Ö¨ú¤è¶ôªº¼ÐÃD¤å¦r
- For Each E In .Range("A9").CurrentRegion.Columns(1).Cells
- If E = °Ï°ì Then D(E.Cells(1, 2) & E.Cells(1, 3)) = E.Cells(1, 4)
- Next
- End With
- With sheet2
- For Each E In .Range("A1").CurrentRegion.Columns(1).Cells
- If Check.Value=1 Then
- If D(E & E.Cells(1, 2)) <> "" Then E.Cells(1, 4) = D(E & E.Cells(1, 2)) + E.Cells(1, 3)
- Else
- If D(E & E.Cells(1, 2)) <> "" Then E.Cells(1, 4) = E.Cells(1, 3)
- End If
- Next
- End With
- End Sub
½Æ»s¥N½X |
|