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

[µo°Ý] do loop ¨D§U

[µo°Ý] do loop ¨D§U

¦U¦ì¤j¤j¦n~

¤pªº²Ä¤@¦¸¾ÇVBA..  ¥Ø«e¥d¦b do Loop °j°é°ÝÃD¡A´£¥Ü¡G¨S¦³do ¦³LOOP¡C

¨n¤F¿Ã¹õ³\¤[¡AÁÙ¬O§ä¤£¥X¿ù»~©Ò¦b ORZ...  ÁÙÀµ½Ð¦U¦ì°ª¤â­ÌÀ°¦£§ä¥X¿ù»~¡A¦pªG¥i¥HÁٽФj¤j³v¦C»¡©ú «D±`·PÁ !

¥H¤U¬O¤pªº±q®Ñ¤W¶i¦æ§ï¼g ¡G

Sub ¥N¸¹()
C = 2

Do While Cells(C, 1) <> ""
Select Case Cells(C, 1)
Case "0015"
Cells(2, C) = "1¥x¥_"

Select Case Cells(C, 1)
Case "0048"
Cells(2, C) = "2«°ªF"

Select Case Cells(C, 1)
Case "0059"
Cells(2, C) = "4·s²ø"

Select Case Cells(C, 1)
Case "0060"
Cells(2, C) = "7·s¦Ë"

Select Case Cells(C, 1)
Case "0082"
Cells(2, C) = "a°ª¶¯"

Select Case Cells(C, 1)
Case "0118"
Cells(2, C) = "3«H¸q"

Select Case Cells(C, 1)
Case "1366"
Cells(2, C) = "8¥x¤¤"

Select Case Cells(C, 1)
Case "0152"
Cells(2, C) = "9¥x«n"

Select Case Cells(C, 1)
Case "1171"
Cells(2, C) = "5ªO¾ô"

Select Case Cells(C, 1)
Case "0185"
Cells(2, C) = "6®ç¶é"

Select Case Cells(C, 1)
Case "0451"
Cells(2, C) = "bùªF"

Select Case Cells(C, 1)
Case "0875"
Cells(2, C) = "C©¾§µ"

Select Case Cells(C, 1)
Case "0680"
Cells(2, C) = "E «n¥x¤¤"

Select Case Cells(C, 1)
Case ""
Cells(2, C) = "¥¼©w¸q"

End Select
C = C + 1


Loop
End Sub

¤£»Ý­n¨º麽¦hselect casr
ss

TOP

ÁÂÁ¤j¤j«üÂI~
¤p©f­è­èµo²{©Ò¼¶¼gªºµ{¦¡¦³¥Ù¬Þ¡A§Ú¦A¦^¥h­×§ï¬ã¨s

TOP

¦^´_ 1# l394244
  1. Option Explicit
  2. Sub ¥N¸¹()
  3.     Dim C As Integer
  4.     C = 2
  5.     Do While Cells(C, 1) <> ""
  6.         Select Case Cells(C, 1)
  7.             Case "0015"
  8.                 Cells(2, C) = "1¥x¥_"
  9.             Case "0048"
  10.                 Cells(2, C) = "2«°ªF"
  11.             Case "0059"
  12.                 Cells(2, C) = "4·s²ø"
  13.             Case "0060"
  14.                 Cells(2, C) = "7·s¦Ë"
  15.             Case "0082"
  16.                 Cells(2, C) = "a°ª¶¯"
  17.             Case "0118"
  18.                 Cells(2, C) = "3«H¸q"
  19.             Case "1366"
  20.                 Cells(2, C) = "8¥x¤¤"
  21.             Case "0152"
  22.                 Cells(2, C) = "9¥x«n"
  23.             Case "1171"
  24.                 Cells(2, C) = "5ªO¾ô"
  25.             Case "0185"
  26.                 Cells(2, C) = "6®ç¶é"
  27.             Case "0451"
  28.                 Cells(2, C) = "bùªF"
  29.             Case "0875"
  30.                 Cells(2, C) = "C©¾§µ"
  31.             Case "0680"
  32.                 Cells(2, C) = "E «n¥x¤¤"
  33.             Case Else    ' ""
  34.                 Cells(2, C) = "¥¼©w¸q"
  35.         End Select
  36.         C = C + 1
  37.     Loop
  38. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¤H­n¦Û·R¡A¤~¯à·R´¶¤Ñ¤Uªº¤H¡C
ªð¦^¦Cªí ¤W¤@¥DÃD