½Ð°Ý¦U¦ì¦Ñ®v¡An¦p¦ó¹ïÀ³¥H¤Uªº¼Æ¶q
- ©«¤l
- 51
- ¥DÃD
- 11
- ºëµØ
- 0
- ¿n¤À
- 110
- ÂI¦W
- 0
- §@·~¨t²Î
- win 10
- ³nÅ骩¥»
- office 2007
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2017-7-15
- ³Ì«áµn¿ý
- 2024-10-27
|
½Ð°Ý¦U¦ì¦Ñ®v¡An¦p¦ó¹ïÀ³¥H¤Uªº¼Æ¶q
BÄæ¦ì¹ïÀ³AÄæ¦ì¼Æ¶q¥H270¬°³æ¦ì
½Ð°Ýn¦p¦óקï¡A¤@ȵLªkºâ±oBÄæ¼Æ¶q- Sub to2test()
- Dim e&, st$, sb$
- st = Cells(1, 4)
- sb = Cells(1, 5)
- e = [a65536].End(3).Row - 1: If e < 1 Then Exit Sub
- For i = 3 To e
- If Cells(i, 1) = "" Then
- Cells(i, 2) = ""
-
- On Error Resume Next
-
- ElseIf Cells(i, 1) < st Then
- Cells(i, 2) = -Int(-Cells(i, 1) / st)
- ElseIf Cells(i, 1) + Cells(i - 2, 1) + Cells(i - 1, 1) > sb Then
- Cells(i, 2) = -Int(-Cells(i, 1) / st) - 1
- ElseIf Cells(i, 1) + Cells(i - 2, 1) + Cells(i - 1, 1) = sb Then
- Cells(i, 2) = -Int(-Cells(i, 1) / st) - 1
- ElseIf Cells(i, 1) + Cells(i - 2, 1) = sb Then
- Cells(i, 2) = -Int(-Cells(i, 1) / st) - 1
- Else
-
-
- End If
- Next
- Cells(4, 5) = -Int(-Cells(4, 4) / st)
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 976
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 1018
- ÂI¦W
- 0
- §@·~¨t²Î
- Win10
- ³nÅ骩¥»
- Office 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-4-19
- ³Ì«áµn¿ý
- 2024-10-30
|
¦^´_ 1# wsx1130
205 +344+736 = 1285
270 +270 +540 =1080
B11 ¬O¤£¬On§ï¬° 3
¦pªG¤£¬OÅ޿謰¦ó?
½Ð½T»{¡AÁÂÁ |
-
-
1.JPG
(43.65 KB)
|
|
|
|
|
|
- ©«¤l
- 51
- ¥DÃD
- 11
- ºëµØ
- 0
- ¿n¤À
- 110
- ÂI¦W
- 0
- §@·~¨t²Î
- win 10
- ³nÅ骩¥»
- office 2007
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2017-7-15
- ³Ì«áµn¿ý
- 2024-10-27
|
¦^´_ 2# samwang
¬¡¶Ã¯test.rar (13.21 KB)
Sam¡A©êºp¶Ç¿ùÀɮסAÀ³¸Ó¬°ªþ¥ó¡A³W«h¤´¬°1080 |
|
|
|
|
|
|
- ©«¤l
- 976
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 1018
- ÂI¦W
- 0
- §@·~¨t²Î
- Win10
- ³nÅ骩¥»
- Office 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-4-19
- ³Ì«áµn¿ý
- 2024-10-30
|
¥»©«³Ì«á¥Ñ samwang ©ó 2022-1-3 07:57 ½s¿è
¦^´_ 3# wsx1130
µª®×¦³°ÝÃD§a? ±ø¥ó¥i§_¦b¼g¸Ô²Ó¡A·PÁ |
-
-
1.JPG
(54.05 KB)
|
|
|
|
|
|
- ©«¤l
- 976
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 1018
- ÂI¦W
- 0
- §@·~¨t²Î
- Win10
- ³nÅ骩¥»
- Office 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-4-19
- ³Ì«áµn¿ý
- 2024-10-30
|
¦^´_ 3# wsx1130
3240 / 270 = 12
½Ð¦A½T»{¡AÁÂÁ |
-
-
1.JPG
(79.67 KB)
|
|
|
|
|
|
- ©«¤l
- 976
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 1018
- ÂI¦W
- 0
- §@·~¨t²Î
- Win10
- ³nÅ骩¥»
- Office 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-4-19
- ³Ì«áµn¿ý
- 2024-10-30
|
¦^´_ 3# wsx1130
819 /270 = 3½c(810)¡A¨S¸Ë½c¦³9Ó¡A
261 / 270 = 1½c¡A¥i¥H¦b¸Ë¤W9Ó«e¤@½c
279 / 270 = 2½c(540)¡AÀ³¸Ó 1½c§a? ¦b±N¨S¸Ë½c¦³9Ó¡A¸Ë¨ì¤U¤@½c
¦n¦h°ÝÃD¡A±ø¥ó¤£¬O«Ü©ú½T¡A½Ð¦A½T»{¡AÁÂÁ |
-
-
1.JPG
(56.95 KB)
|
|
|
|
|
|
- ©«¤l
- 976
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 1018
- ÂI¦W
- 0
- §@·~¨t²Î
- Win10
- ³nÅ骩¥»
- Office 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-4-19
- ³Ì«áµn¿ý
- 2024-10-30
|
¦^´_ 3# wsx1130
±ø¥ó¥un¦³¦h¾l¼Æ¶q´N¥[1½c¡A½d¨Ò»¡©ú¦p¤U¡A½Ð´ú¸Õ¬Ý¬Ý¡AÁÂÁÂ
819-->4½c¡A1080-819¡AÁÙ¦³261ӪŶ¡
261 -261 =0½c¡A261Ӹɫe¤@½c
Sub test()
Dim Arr, T%, T1%, Et, i&
T = 270
Arr = Range("a1:b" & [a65536].End(3).Row)
For i = 3 To UBound(Arr)
If Arr(i, 1) = "" Then GoTo 99
If Arr(i, 1) >= 1080 Then
Cells(i, 4) = Application.Round((Arr(i, 1) / T), 0): GoTo 99
Else
For i2 = i To UBound(Arr)
If T1 >= 1080 Then Exit For
If Arr(i2, 1) <> "" Then T1 = T1 + Arr(i2, 1)
Next
End If
For i3 = i To i2 - 1
If Arr(i3, 1) = "" Then GoTo 98
Arr(i3, 1) = Arr(i3, 1) - Et
Cells(i3, 4) = Application.RoundUp((Arr(i3, 1) / T), 0)
Et = T * Cells(i3, 4) - Arr(i3, 1)
98: Next
i = i2 - 1: T1 = 0: Et = 0
99: Next
End Sub |
|
|
|
|
|
|