¦p¦ó³z¹LVBAÀH¾÷"¸U¤¤¨ú¤@"(¦ý¤£¯à«½Æ),©â§¹¤@¸U¦¸
- ©«¤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¦ó³z¹LVBAÀH¾÷"¸U¤¤¨ú¤@"(¦ý¤£¯à«½Æ),©â§¹¤@¸U¦¸
¦pÃD,¤p§Ì¥ÎEXCELªº¨ç¼Æ¼g±o¥X¨Ó
¦ý«á¨Óµo²{EXCEL¨ç¼Æ¤Ó¦h¤F(²¦³º¤@¸UÓÀx¦s®æ)
³t«×·|Åܦ¨ºC¨ì¤£¦æ
©Ò¥H°²³]D1:D10000³£¬O¤£¦PªºÈ
n¦p¦ó¨C¦¸³£¬OÀH¾÷¦b³o¤@¸U®æ¸Ì¨ú¤@ÓÈ
³sÄò°õ¦æ¤@¸U¦¸
¦ý³£¤£¯à«½Æ
ª½¨ì³Ì«á¤@ÓȳQ¨ú§¹µ²§ô©O?
PS:¨ú§¹ªº¦P®É²M°£°O¾ÐÅé,¦]¬°¤U¦¸ÁÙnÄ~Äò°õ¦æ¦P¼Ëªºµ{¦¡,ÁקK°O¾ÐÅ餣¨¬
¤£¦n·N«ä,³Â·Ð¦U¦ì¥ý¶i¤F... |
|
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
|
|
|
|
|
- ©«¤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
- 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
- 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-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
- 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
|
¦^´_ 9# stillfish00
¤j¤j¤Ó¼F®`¤F,§Ú¬Ý¤Fº¡¤[ªºÁÙ¬O¬Ý¤£¬O«ÜÀ´,¬°¦ó¥L¤£·|«½Æ,¥H¤ÎRESIZEªº¤èªk¬O¦p¦óÀ³¥Îªº
¥i¥H¦A½Ð±Ð±z¤@¤U:
Y¬OA~CÄæ³£¦U¦³¤@¦Ê®æ¸ê®Æ
§Ú·Qn¶i¦æ±Æ¦C²Õ¦X,¤]´N¬OA1 & B1 & C1 µM«áA2 & B1 & C1 ¥H¦¹Ãþ±À,¨CÓ²Õ¦X³£n¦³¤]´N¬O100*100*100=100¸Uªº²Õ¦X
¦p¦ó¶]³Ì§Ö,§Ú¼gªºµ{¦¡¶]±o¦³ÂI¤[... |
|
PKKO
|
|
|
|
|