(¤w¸Ñ¨M)¿ù»~1004 ½Ð±Ð¤@¤U³o¤@¬qcode¬O§_¦³ÅÞ¿è¿ù»~
- ©«¤l
- 40
- ¥DÃD
- 13
- ºëµØ
- 0
- ¿n¤À
- 69
- ÂI¦W
- 0
- §@·~¨t²Î
- w7
- ³nÅ骩¥»
- office07
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-4-24
- ³Ì«áµn¿ý
- 2012-8-20
|
(¤w¸Ñ¨M)¿ù»~1004 ½Ð±Ð¤@¤U³o¤@¬qcode¬O§_¦³ÅÞ¿è¿ù»~
¥»©«³Ì«á¥Ñ m09903020 ©ó 2012-6-21 20:36 ½s¿è
¤£¦n·N«ä¡A½Ð°Ý³o¤@¬q¦³1004À³¥Îµ{¦¡©Îª«¥ó©w¸q¤Wªº¿ù»~ ...
¤£ª¾¹D¬O¤°»ò°ÝÃD?QQ- Sub SAMAD()
- Dim myRange As Range
- For i = 1 To 299
- For Each c In Sheets("batch_pool").Range("A1:A" & [a1].End(xlDown).Row)'§ì¨ú5/10/50µ§integer¸ê®Æ
- ordernum = Sheets("order_pool").Cells(i, 1)'§ì¨ú299µ§¸ê®Æ¦ì§}
- Dim distance, SRD'¶ZÂ÷¤½¦¡¥Î
- distance = 0
- SRD = 0
- If (ordernum > 0) And (ordernum < 3001) Then
- For j = 1 To 5
- temp = Worksheets("Á`q³æ").Cells(ordernum + 1, j + 6) 'temp is q³æ¤¤¨Cµ§item¥N¸¹
- distance = Sheets("Àô¹Ò¶ZÂ÷").Cells(c, temp + 2) '§Q¥Î¶ZÂ÷ªí¹ïÀ³¥X¤w¶ZÂ÷
- SRD = distance + SRD 'summation's idea by formula
- Next j
- SRD = SRD / 5 'SRD of SAMAD's fomula
- Sheets("order_pool").Cells(i, 2) = SRD 'put into sheet
-
- ElseIf (ordernum >= 3001) And (ordernum < 6001) Then '10 items
- For j = 1 To 10
- temp = Worksheets("Á`q³æ").Cells(ordernum + 1, j + 6)
- distance = Sheets("Àô¹Ò¶ZÂ÷").Cells(c, temp + 2)
- SRD = distance + SRD
- Next j
- SRD = SRD / 10
- Sheets("order_pool").Cells(i, 2) = SRD
-
- ElseIf (ordernum >= 6001) And (ordernum < 9001) Then '50 items
- For j = 1 To 50
- temp = Worksheets("Á`q³æ").Cells(ordernum + 1, j + 6)
- SRD = distance + SRD
- Next j
- SRD = SRD / 50
- Sheets("order_pool").Cells(i, 2) = SRD
- Else
- MsgBox "error³o»ò¤E«Ü©_©Ç£°§A"
- End If
- Next
- Next i
- Set myRange = Worksheets("order_pool").Range("B1:B299")
- result = Application.WorksheetFunction.min(myRange)
- If (result.Address.Row > 0) And (result.Address.Row < 3001) Then
- Call cal_vol(ByVal 5)
- ElseIf (result.Address.Row >= 3001) And (result.Address.Row < 6001) Then
- Call cal_vol(ByVal 10)
- ElseIf (result.Address.Row >= 6001) And (result.Address.Row < 9001) Then
- Call cal_vol(ByVal 50)
- Else
- MsgBox "error³o»ò¤E«Ü©_©Ç£°§A"
- End If
- End Sub
½Æ»s¥N½X ÁÂÁ¦U¦ì |
|
|
|
|
|
|
- ©«¤l
- 40
- ¥DÃD
- 13
- ºëµØ
- 0
- ¿n¤À
- 69
- ÂI¦W
- 0
- §@·~¨t²Î
- w7
- ³nÅ骩¥»
- office07
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-4-24
- ³Ì«áµn¿ý
- 2012-8-20
|
¦^´_ 2# oobird
ÁÂÁÂOO¤j¡A§Ú¥Î±z«Øijªº¤è¦¡«¼g µo²{§Ú¿ù¦b for each ªºc §ï¦¨¥Î¼g¦ºªºfor°j°é¶]´N¨S°ÝÃD¤F
ÁÙ¦³¨º"¶Ã´úªº"´X¦æ§PÂ_¦¡§Úµo²{¬O¦Û¤v·d¿ùF1ªº·N«ä¡C |
|
|
|
|
|
|
- ©«¤l
- 40
- ¥DÃD
- 13
- ºëµØ
- 0
- ¿n¤À
- 69
- ÂI¦W
- 0
- §@·~¨t²Î
- w7
- ³nÅ骩¥»
- office07
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-4-24
- ³Ì«áµn¿ý
- 2012-8-20
|
¦^´_ 4# GBKEE
ÁÂÁ¤j¤j¸Ñ´b¡A§Ú¦A ¥Î Option Explicit debug¡C |
|
|
|
|
|
|
- ©«¤l
- 40
- ¥DÃD
- 13
- ºëµØ
- 0
- ¿n¤À
- 69
- ÂI¦W
- 0
- §@·~¨t²Î
- w7
- ³nÅ骩¥»
- office07
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-4-24
- ³Ì«áµn¿ý
- 2012-8-20
|
¦^´_ 2# oobird
http://dl.dropbox.com/u/16247104/10000%20order_sortingalready.xlsm
¦]¬°µ{¦¡¹L¤j |
|
|
|
|
|
|
- ©«¤l
- 1572
- ¥DÃD
- 16
- ºëµØ
- 2
- ¿n¤À
- 1521
- ÂI¦W
- 0
- §@·~¨t²Î
- xp
- ³nÅ骩¥»
- office 2003
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2016-1-13
|
result = Application.WorksheetFunction.Min(myRange)
If (result.Address.Row > 0) And (result.Address.Row < 3001) Then
³o¸Ì´N¤£¦XÅÞ¿è¡A¨S¦³³o¼Ëªí¹Fªº¡I
§AÀ³¸Ó¦b¤u§@ªí¤W´ú¸Õ¡A¬Ý¿ù»~¤¤Â_¦bþ¸Ì
¥ú¬Ý¥N½X¨S¦³¤å¥ó«ÜÃø§ä¥X©Ò¦³°ÝÃD¡C |
|
|
|
|
|
|