- ©«¤l
- 913
- ¥DÃD
- 150
- ºëµØ
- 0
- ¿n¤À
- 1089
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- office 2019
- ¾\ŪÅv
- 50
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2011-8-28
- ³Ì«áµn¿ý
- 2023-7-19
|
¦^´_ 36# ã´£³¡ªL
ã¤j¦n,
µ{¦¡§ï¬°With Range(xH, xR(0, 0)): .Calculate: .Value = .Value: End With ²{¦b¥¿±`¤F¡I¯uÁÂÁ§A..
§Ú¦b¤u§@®É,¥Î¨ì¤£¤Öµ{¦¡¤Î¤½¦¡,¦]¬°§@·~®É¶¡¬O¥H¬ípªº,¤£±o¤£¥Î¤â°Êpºâ,©Ò¥H§Ú¤~·|¤@¨B¨B§ï¦¨µ{¦¡,§Æ±æ¥i¥HÁYµuµ¥«Ý®É¶¡,¤£µM¦³®ÉÔexcel·|·í±¼,¤£µM´N¬O®É¶¡¤Ó¤[,§Ú·|³Q±þ¤F....
§Ú¬Ý¨ìSub TEST_2,¦³qÁʼƪº¥[Á`¥\¯à,½Ð°ÝSub TEST_1¥i¥H³o¼Ë°µ¶Ü?¦ý¬O¥[Á`«á§Ú·QȤÆ,¤£n¦³¤½¦¡...- Sub TEST_1()
- Dim R&, Arr, Brr, i&, S&(1 To 2), V1, V2, C%
- R = Cells(Rows.Count, "K").End(xlUp).Row
- If R <= 2 Then Exit Sub
- Arr = Range("K2:Q" & R)
- Brr = Range("M2:N" & R)
- For i = 1 To UBound(Arr)
- If Arr(i, 1) = "«~¦W" Then Erase S: C = 1: GoTo 101
- If Arr(i, 1) = "¦Xp" Then
- Brr(i, 1) = S(1) '½c¼Æ¦Xp
- Brr(i, 2) = S(2) '²~¼Æ¦Xp
- Erase S: C = 0: GoTo 101
- End If
- If C = 1 Then
- Brr(i, 1) = "": Brr(i, 2) = ""
- V1 = Val(Arr(i, 6)) '¥]¸Ë¼Æ
- V2 = Val(Arr(i, 7)) 'qÁʼÆ
- If Arr(i, 2) = "" Or V1 = 0 Then GoTo 101
- Brr(i, 1) = Int(V2 / V1) '½c¼Æ
- S(1) = S(1) + Brr(i, 1) '½c¼Æ²Öp
- Brr(i, 2) = V2 Mod V1 '²~¼Æ
- S(2) = S(2) + Brr(i, 2) '²~¼Æ²Öp
- End If
- 101: Next i
- Range("M2:N" & R) = Brr
- End Sub
½Æ»s¥N½X |
|