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

[µo°Ý] ByVal a As Range~¦¹Ãþ»yªkªº¥Îªk¡A¤£¤Ó²M·¡

Do   While  ±ø¥ó  (±ø¥ó¦¨¥ß °õ¦æ°j°é)  /  Until  ±ø¥ó  (±ø¥ó¦¨¥ß ¤£°õ¦æ°j°é)  ***¥i¸m©ó Do
     if  ±ø¥ó=True Then   Exit Do                          '*** ¤]¥i¤¤¶¡³]¥ß±ø¥ó Â÷¶}°j°é
Loop    While  ±ø¥ó  (±ø¥ó¦¨¥ß °õ¦æ°j°é)  /  Until  ±ø¥ó  (±ø¥ó¦¨¥ß ¤£°õ¦æ°j°é)  ***¤]¥i¸m©ó Loop

TOP

¥»©«³Ì«á¥Ñ kobo ©ó 2011-12-30 15:10 ½s¿è

Dim IRptData As Integer '   «Å§iIRptData ¬°¾ã¼Æ
   IRptData = 6                '  IRptData ªì©l­È¬° 6
   ..........
   ¡õ¡õ¡õ¡õ ­«Âаõ¦æ°j°é,ª½¨ì Left(Trim.....), 1) = "¥»" ¦¨¥ß¬°¤î¡õ¡õ¡õ¡õ(±ø¥ó¦¨¥ß¸õ¥X°j°é)
    Do Until Left(Trim(Sheets("¸ê®Æ").Cells(IRptData, 4).Value), 1) = "¥»"  (IRptData²Ä¤@¦¸¬O6)
      .............
        IRptData = IRptData + 1   '¨C°õ¦æ¤@¦¸ IRptData ´N¥[ 1   
    Loop

TOP

¥»©«³Ì«á¥Ñ hugh0620 ©ó 2011-12-30 15:15 ½s¿è

¦^´_ 4# sayloveme


    ¦]¬°¥¦¬O¼g °j°é DO... LOOP
    ·í§P©w¸ê®Æ="¥»"®É~ ´NÂ÷¶}¦^°é  
    (°j°é»Ý­n¦³¤@­Ó°±¤îªº±ø¥ó~ Do until ±ø¥ó¦¡ =>²Å¦X³o­Ó±ø¥ó´NÂ÷¶}°j°é~
     ¹³§A©ñ¤W¥hªºµ{¦¡½X«Ü¥i¯à·|²£¥Í´`Àô°j°é¤¤~  ¦]¬°¦³¥i¯à¸ê®Æ·|¦³"¥»"³o­Ó¸ê®Æ)
    ¶i¦æ¤U¤@¬qµ{¦¡½X©ÎÂ÷¶}µ{¦¡
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

¦^´_ 2# kobo

·PÁ¤j¤j¡A¨Ì·Ó¤j¤jµ¹ªº¤è¦V¥J²ÓÂsÄý¹L¤@¹M¡A¤ß¸Ì¤j·§¦³­Ó¤è¦V¡A¦³­Ó³¡¥÷·Q¦A½Ð±Ð¤@¤U¡A
IRptData = 6
   FmdSTotal = 0
   
    Do Until Left(Trim(Sheets("¼f¬d¸ê®Æ").Cells(IRptData, 4).Value), 1) ="¥»"

¨ä¤¤Cells(IRptData, 4)³o­Ó¬O§_¯à°÷¬Ý¦¨Cells(6, 4)¡A¥t¥~³Ì«á="¥»"³o­Ó¦³¬Æ»ò§@¥Î¹À!? ÁÂÁ¤j¤j

TOP

¦^´_ 2# kobo


  ¤j¤j±z¦n¡A¨º¹³¬ODim IRptData As Integer¡A¤w¸g©w¸q¬°¾ã¼Æ¤F¡A¬°¦ó©³¤UIRptData = 6¡BFmdSTotal = 0 ÁÙ­n¶i¦æ³o¼Ëªº³]©w¡A¨º­Ó6¬O§_¦³ÂI¦h¾l©O?¡A
ÁÙ¬O»¡¥¦¦³¬Æ»ò¯S©w§t¸q©O!? ÁÂÁ¡A¥t¥~ Until Left (Trim(Sheets("¼f¬d¸ê®Æ").Cells(IRptData, 4).Value), 1)¡A³o¦ê»yªk·í¤¤¡A
¤ñ¸û¤£À´ªº¬OUntil Left (Trim(¸ê®Æ).Cells(¦Û©w¸q,4).Value),1)¡A³o¼Ëªº°µªk¡A·|¦³¬Æ»ò¼Ëªº®ÄªG©O!?¤w¥Î²ÊÅé¼Ð¥Ü¡A«D±`ÁÂÁ±zªº¦^µª¡C

TOP

IRptData -->¦Û­qªº¾ã¼ÆÅܼÆ
µ{¦¡²Ä¤G¦æ¤v»¡©ú¤F (Dim IRptData As Integer)
Do ..... Loop --> ­«Âаõ¦æ .....  ³¯­z¦¡(°j°é)
¥H¤WÀ³¬Ovba°ò¥»¥\,¦bexcel ªºvba½s½r¾¹¤¤ªº»¡©úÀɤ¤³£¦³½d¨Ò»¡©ú
µ½¥Îvba½s½r¾¹¤¤ªº»¡©úÀÉ,¥iÅý±zªºvba¥\¤O¤j¼W

TOP

        ÀR«ä¦Û¦b : ¦a¤WºØ¤Fµæ¡A´N¤£©öªø¯ó¡F¤ß¤¤¦³µ½¡A´N¤£©ö¥Í´c¡C
ªð¦^¦Cªí ¤W¤@¥DÃD