¦p¦ó³z¹LVBAÀH¾÷"¸U¤¤¨ú¤@"(¦ý¤£¯à«½Æ),©â§¹¤@¸U¦¸
- ©«¤l
- 1018
- ¥DÃD
- 15
- ºëµØ
- 0
- ¿n¤À
- 1058
- ÂI¦W
- 0
- §@·~¨t²Î
- win7 32bit
- ³nÅ骩¥»
- Office 2016 64-bit
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2012-5-9
- ³Ì«áµn¿ý
- 2022-9-28
|
¥»©«³Ì«á¥Ñ stillfish00 ©ó 2014-8-20 09:30 ½s¿è
¦^´_ 7# GBKEE
«ä¼{¤£©P:L ¡AÀ³¸Ó¬O
r = Int(Rnd * (UBound(ar) - i+1)) + i- Sub test() 'ÀH¾÷¨ú¥X«ü©wӼƪº¤£«½Æ
- Dim ar, num As Long, r, tmp
-
- ar = [D1:D10000].Value 'ì©l¸ê®Æ(¥²¶·¬O¤£«½ÆÈ)
- num = 10000 '³]©w¨ú´XÓÈ
-
- Randomize 'ªì©l¤ÆÀH¾÷¨ç¼ÆRnd()ªººØ¤l
- For i = 1 To num
- '±qi¨ì³Ì«á¤@µ§¨ú¥X¤@Ó
- r = Int(Rnd * (UBound(ar) - i + 1 )) + i
- '¨ú¨ìªº´«¨ì«e±
- tmp = ar(r, 1)
- ar(r, 1) = ar(i, 1)
- ar(i, 1) = tmp
- Next
-
- '¨Ì§Çµ²ªG¨ìFÄæ
- [F1].Resize(num) = ar
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 1018
- ¥DÃD
- 15
- ºëµØ
- 0
- ¿n¤À
- 1058
- ÂI¦W
- 0
- §@·~¨t²Î
- win7 32bit
- ³nÅ骩¥»
- Office 2016 64-bit
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2012-5-9
- ³Ì«áµn¿ý
- 2022-9-28
|
¦^´_ 7# GBKEE
©êºp¡A¤Ö¤F¬A¸¹
r = Int(Rnd * (UBound(ar) - i)) + i
·PÁ«ü¥¿!! |
|
|
|
|
|
|
- ©«¤l
- 1018
- ¥DÃD
- 15
- ºëµØ
- 0
- ¿n¤À
- 1058
- ÂI¦W
- 0
- §@·~¨t²Î
- win7 32bit
- ³nÅ骩¥»
- Office 2016 64-bit
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2012-5-9
- ³Ì«áµn¿ý
- 2022-9-28
|
¥»©«³Ì«á¥Ñ stillfish00 ©ó 2014-8-19 17:15 ½s¿è
¨Ñ°Ñ¦Ò:- Sub test() 'ÀH¾÷¨ú¥X«ü©wӼƪº¤£«½Æ
- Dim ar, num As Long, r, tmp
-
- ar = [D1:D10000].Value 'ì©l¸ê®Æ(¥²¶·¬O¤£«½ÆÈ)
- num = 10000 '³]©w¨ú´XÓÈ
-
- Randomize 'ªì©l¤ÆÀH¾÷¨ç¼ÆRnd()ªººØ¤l
- For i = 1 To num
- '±qi¨ì³Ì«á¤@µ§¨ú¥X¤@Ó
- r = Int(Rnd * UBound(ar) - i) + i
- '¨ú¨ìªº´«¨ì«e±
- tmp = ar(r, 1)
- ar(r, 1) = ar(i, 1)
- ar(i, 1) = tmp
- Next
-
- '¨Ì§Çµ²ªG¨ìFÄæ
- [F1].Resize(num) = ar
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 549
- ¥DÃD
- 152
- ºëµØ
- 0
- ¿n¤À
- 691
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- OFFICE 2010
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-8-10
- ³Ì«áµn¿ý
- 2022-9-7
|
¦^´_ 3# PKKO
¦]¬°§Ú¦b¤½¥q¤£¯à¤W¶Çªþ¥ó,¤p§Ìªþ¤Wµ{¦¡½X¥H¤Î¤½¦¡
¦]¬°vbaÁÙ¤£¼ô±xªºÃö«Y,°t¦X¨ç¼Æ¨Ï¥Î= =½Ð§O¨£©Ç
1.¥ý¦bb11ªº¦ì¸m¿é¤J=IFERROR(VLOOKUP(B10,F:F,1,FALSE),"NO")
2.±Ndata©ñ¸m¦bdÄæ
3.°õ¦æ¥¨¶°- Sub test()
-
- Application.ScreenUpdating = False
- Dim x As Long
- Dim y As Long
- Columns("F:F").ClearContents
- x = WorksheetFunction.CountA(Range("d:d"))
- i = 1
- Do While i <= x
- Randomize ' ¹ï¶Ã¼Æ²£¥Í¾¹°µªì©l¤Æªº°Ê§@¡C
- y = Int((x - 1 + 1) * Rnd + 1) '¶Ã¼Æ¸¹½X
- Cells(10, 2).Value = Cells(y, 4).Value
- If Cells(11, 2).Value = "NO" Then '¦pªG«½Æ«h«·s¶]¦^°é(i³¡·|+1)
- Cells(i, 6).Value = Cells(10, 2).Value '¦pªG¨S¦³«½Æ«h±NDATA©ñ¦bFÄæ
- i = i + 1
- End If
- Loop
- End Sub
½Æ»s¥N½X |
|
PKKO
|
|
|
|
|
- ©«¤l
- 549
- ¥DÃD
- 152
- ºëµØ
- 0
- ¿n¤À
- 691
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- OFFICE 2010
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-8-10
- ³Ì«áµn¿ý
- 2022-9-7
|
·PÁ¤j¤j,¤p§Ì±Nµ{¦¡§ï½s,¤w¸g¥i¥H¥¿±`¨Ï¥Î,«D±`·P¿E^_^ |
|
PKKO
|
|
|
|
|