ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

½Ð±Ð¦³Ãö¶Ã¼Æªº»yªk°ÝÃD¡H

½Ð±Ð¦³Ãö¶Ã¼Æªº»yªk°ÝÃD¡H

¦U¦ì½×¾Âªº¥ý¶i¤j®a¦n¡I¤£¦n·N«ä¡C¤p§Ì¤S¨Ó½Ð±Ð¤j®a°ÝÃD¤F¡C³o¦¸ªººc·Q¬O¡y¦Û°Ê¿ï¾Üµû»y¨t²Î¡z¡A·íµM³o¥u¬O´ú¸Õªº©Ê½è¡A³Ì«áÁÙ¬O­n¥Ñ¨Ï¥ÎªÌ¤]´N¬O±Ð®v¨Ó¿ï¾Ü¯u¥¿¾A¦X¾Ç¥Íªºµû»y¡C³o»yªk·|±N¦Ñ®v©Òµ¹ªº¥­®É¤À¼Æ¡A¬D¿ï¥X¹w³]ªºµû»y¡A»yªk¦p¤U¡G
Option Explicit
Sub ¦Û°Êµû»y¨t²Î()
Dim a1, a2, a3, a4, a5 As String
Dim myrange, z, x1
a1 = "«~¾Ç­ÝÀu"
a2 = "¾Äµo¦V¤W"
a3 = "Áo©ú§D«W"
a4 = "¥D°Ê¨Dª¾"
a5 = "¦U¬ì§¡Àu"
z = 5
    For x1 = 1 To z
    Set myrange = Sheets("sheet1").Range("c" & x1)
    Select Case myrange
        Case 90 To 99
            Sheets("sheet1").Range("c" & x1) = " a" & (Int(Rnd() * 5 + 1))
    End Select
    Next x1
  End Sub

°ÝÃD¡G§Ú¬O·Q¥Ñ¶Ã¼Æ¥h¬D¿ï¹w³]ªº5­Óµû»y¡A¦ý¬Oªí®æ¤º«o¥X²{a2,a1,a5¦Ó¤£¬O¤¤¤åªºµû»y¡A¯u¤£ª¾¬O­þ¸Ì¥X°ÝÃD¡A½Ð±Ð¤@¤U¡H

  1. Dim myrange, z, x1, a
  2. a = Array("«~¾Ç­ÝÀu", "¾Äµo¦V¤W", "Áo©ú§D«W", "¥D°Ê¨Dª¾", "¦U¬ì§¡Àu")
  3. z = 10
  4.     For x1 = 1 To z
  5.     Set myrange = Sheets("sheet1").Range("c" & x1)
  6.     Select Case myrange
  7.         Case 90 To 99
  8.             Sheets("sheet1").Range("d" & x1) = a(Int(Rnd() * 5))
  9.     End Select
  10.     Next x1
½Æ»s¥N½X

TOP

¦^´_ 2# chin15
chin15 ÁÂÁ§A¡A¥i¬O»yªk¦b°õ¦æ®É¡A·|¥X²{¿ù»~°T®§¡C¡u¤£¥¿½Tªº¥~³¡µ{§Ç¡v¡C

TOP

¦^´_ 3# skyutm
chin15 ªº½d¨Ò¬OOKªº¡C§A¸Õ¸Õ³o­Ó¡A¬O¤£·|¦³°ÝÃDªº¡C
¦³Ãö¶Ã¼Æªº»yªk°ÝÃD.rar (8.92 KB)

TOP

¦^´_ 4# c_c_lai
¯u¬O¤Ó·PÁ¤F¡I§Ú¤S¾Ç¨ì¤@©Û¤F¡A¦hÁ«ºô¸ô¤W¦³³o»ò¦h¼ö¤ßªº«e½ú¡C­ì¥»§Ú¥H¬°«ÜµL½ìªºvba»yªk¡A¨S·Q¨ì¦b¤j®aªº¼ö¤ßÀ°¦£¤U¡A¶V¨Ó¶V¦³¦¨´N·P¡C

TOP

¦nªF¦è¡A¤S¾Ç¨ìªF¦è¤F¡C

TOP

        ÀR«ä¦Û¦b : ¤H¥Í¤£¤@©w²y²y¬O¦n²y¡A¦ý¬O¦³¾ú½mªº±j¥´ªÌ¡AÀH®É³£¥i¥H´§´Î¡C
ªð¦^¦Cªí ¤W¤@¥DÃD