- ©«¤l
- 522
- ¥DÃD
- 36
- ºëµØ
- 1
- ¿n¤À
- 603
- ÂI¦W
- 0
- §@·~¨t²Î
- win xp sp3
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-12-13
- ³Ì«áµn¿ý
- 2021-7-11
|
¥»©«³Ì«á¥Ñ yen956 ©ó 2014-3-22 15:15 ½s¿è
¦^´_ 19# myleoyes
¸Õ¸Õ¬Ý:
- Sub «Ø¥ß¤é´Á¤ñ¹ïªí()
- Dim i As Integer
- Sheets("Sheet1").Activate
-
- '®Ú¾Ú [B3], ¶ñ¤J³sÄò9Ӥ몺 µ²ºâ¤é´Á ¨ì ÄæZ
- '¨Ã¶ñ¤J³sÄò9Ӥ몺 ¦~¤ë ¨ì ÄæY, ¨Ñ [Y2] Match ¦~¤ë ¥Î
- '¦]¬°¬Y¨Ç¤ë¥÷¶W¹L1µ§, ¥B¦P¤ë¥÷¶·¼g¦b¦P¤@¦C, ¬G¥Î MATCH ¤ñ¹ï¬O§_¦P¤@¤ë¥÷ªº¸ê®Æ
- '½Ðקï For i = 1 To 9 ¤§ 9, ¦pªG¹wpnn«Ø¥ß³sÄò 12Ӥ몺¸ê®Æ, «h§ï¬° 12
- For i = 1 To 9
- Cells(i + 2, 26) = DateSerial(Year([B3]), Month([B3]) + i, 1) - 1
- Cells(i + 2, 25) = Year(Cells(i + 2, 26)) - 1911 & Month(Cells(i + 2, 26))
- Next i
- End Sub
- Sub Exyen()
- Dim Rng, chkRng As Range
- Dim i, endRow, endRow2, blankRow As Integer
- endRow = [A2000].End(xlUp).Row
- [AH1].Resize(200, 40) = ""
- [Y3].Resize(200, 2) = ""
- «Ø¥ß¤é´Á¤ñ¹ïªí
- endRow2 = [Y200].End(xlUp).Row
-
- Sheets("Sheet1").Activate
- [M3] = 0.0254 '¦¹¦C "É¥Î" M$3¬OÓÅܼƨëD©T©wÈ
- blankRow = 3
- oldRow = 3
- Application.Calculation = xlManual
-
- For i = 3 To endRow
-
- 'Y Cells(2, i + 31)<>"", «h³oµ§¸ê®Æ¤vµ²ºâ¹L, ´«¤U¤@µ§
- If Cells(2, i + 31) <> "" Then GoTo next1:
-
- '§_«h±N ½s¸¹ ¼g¤J Cells(2, i + 31)
- Cells(2, i + 31) = Cells(i, 1)
-
- '±N ¥Ø«e³o¤@µ§ ÄæB ¤§ ¦~¤ë©ñ¤J [Y1], ¨Ñ [Y2] Match ¤ñ¹ï¦~¤ë ¥Î
- [Y1] = Year(Cells(i, 2)) - 1911 & Month(Cells(i, 2))
-
- '¦]¬°¬Y¨Ç¤ë¥÷¶W¹L1µ§, ¥B¦P¤ë¥÷¶·¼g¦b¦P¤@¦C, ¬G¥Î MATCH ¤ñ¹ï¬O§_¦P¤@¤ë¥÷ªº¸ê®Æ
- [Y2] = "=MATCH(Y1,Y3:Y200,0)"
-
- blankRow = [Y2] + 2
- If Cells(i, 1) <> 0 Then
- Range(Cells(blankRow, i + 31), Cells(endRow2, i + 31)) = "=ROUND($F$" & i & "*$M$3,2)"
- Else
- Range(Cells(blankRow, i + 31), Cells(i, i + 31)) = "=ROUND($F$" & i & "*$M$3,2)"
- End If
- Cells(1, i + 31) = "=SUM(R3C" & i + 31 & ":R200C" & i + 31 & ")"
- next1:
- Next
- Application.Calculation = xlAutomatic
- End Sub
½Æ»s¥N½X |
|