- ©«¤l
- 472
- ¥DÃD
- 5
- ºëµØ
- 0
- ¿n¤À
- 485
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows
- ³nÅ骩¥»
- MS Office
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- »´ä
- µù¥U®É¶¡
- 2010-7-4
- ³Ì«áµn¿ý
- 2014-12-28
|
¥»©«³Ì«á¥Ñ kimbal ©ó 2013-5-31 01:40 ½s¿è
¦^´_ 1# yliu - Private Sub CommandButton2_Click()
- Application.ScreenUpdating = False
- Application.Calculation = xlCalculationManual
- Dim rowcnt As Long
- Dim i As Long
- Dim lngVlookupRow As Long
- Dim lngCurrenMonth As Long
- Dim lngCurrValue As Long
- '²M²z¼ƾÚ
- Sheets("Á`ªí").Activate
- Sheets("Á`ªí").Range("A3").CurrentRegion.Offset(1, 1).Clear
- Sheets("ì©l¸ê®Æ").Activate
- With Sheets("ì©l¸ê®Æ")
- rowcnt = .Cells(1, 1).CurrentRegion.Rows.Count
- For i = 1 To rowcnt
- lngCurrenMonth = 0
- If IsDate(.Cells(i, 2)) Then
- lngCurrenMonth = Month(.Cells(i, 2)) '·í¦æ¤ë¥÷
- End If
- If lngCurrenMonth > 0 And Not (IsError(Application.Match(.Cells(i, 1), Sheets("Á`ªí").Range("A:A"), 0))) Then
- lngVlookupRow = Application.Match(.Cells(i, 1), Sheets("Á`ªí").Range("A:A"), 0) '·í¦æÃþ«¬¦bÁ`ªí¦æ¼Æ
- lngCurrValue = .Cells(i, 3)
- With Sheets("Á`ªí").Cells(lngVlookupRow, lngCurrenMonth + 1) '©ñ¼Æ¾Ú¨ìÁ`ªí¤W
- .Value = .Value + lngCurrValue
- End With
- End If
- Next
-
- End With
- Application.Calculation = xlCalculationAutomatic
- Application.ScreenUpdating = True
- End Sub
½Æ»s¥N½X |
|