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

For Each ªºrange¡Adatatype

For Each ªºrange¡Adatatype

For Each ªº½d³ò³¡¤À§Ú¯uªº¤£À´@@..­n«ç»ò´ú¸Õ¤F  ©ó¬O¤W¨Óµo°Ý
§Úªº·Qªk¬O·Q¥Î¦r¦êªº¤è¦¡ K1 = (G & Str(ordernum + 1)) §Î¦¨ for each G in range(G2,K2)¡A¦ýª«¥ó«á­±.end(xlDown)¦ü¥G¤£¦Y³o®M¥H¦Ü©óK1¦³°ÝÃD¡A
¦Ó§Ú¦³¼Æµ§­q³æ­n¶]  ¤£ª¾¹D³o¼Ë¼gªk¤£¦X¾A¦b­þ?
javascript:;
½Ð°Ý¤@¤UFor Each ªºRange() ¬A¸¹¸ÌÃä»Ý­n°ÊºA§ïÅܪº¤èªk¦³¤°»ò¼gªk?
  1. Sub a()
  2. Call cal_item_num_in_asile_5items(arr_order_list(i))
  3. end sub
  4. Sub cal_item_num_in_asile_5items(ByVal ordernum)  '§ì­q³æªºarr_order_list(i)
  5. Dim G, G1, K1 As String

  6. G1 = (G & Str(ordernum + 1))
  7. K1 = (G & Str(ordernum + 1))
  8.   For Each G In Range([G1], [K1].End(xlDown)) '§ì­q³æªºG±Æ²Äordernum+1­Ócol
  9.   'K1¤£ª¾¹D­þ¸Ì¦³°ÝÃD
  10. end sub
½Æ»s¥N½X

°ÝÃD.JPG (50.05 KB)

Sheet DATA

°ÝÃD.JPG

¦^´_ 1# m09903020
    [ ¤£±µ¨üÅÜ¼Æ ]        [ G1 ]->¤u§@ªíªºG1 ¦ì¸m
For Each G In Range([G1], [K1].End(xlDown)) '§ì­q³æªºG±Æ²Äordernum+1­Ócol
-> For Each G In Range(G1,Range( K1).End(xlDown))

TOP

ÁÂÁÂGBKEE¡A¦A½Ð±Ð¤@°Ý¡A±z»¡¤£±µ¨üÅܼƬO"´N¹³G1=>ª½±µ¶ë¦ì¸mµ¹¥¦"ªº·N«ä¶Ü?

TOP

¦^´_ 3# m09903020
Åܼƪº³]©w À³ÁקK¨Ï¥Î Excel ªº¤w¨Ï¥Îªº ÃöÁä¦r
¦pÅÜ¼Æ G1="A1:C1"   Range( G1) =>[ A1:C1 ]

TOP

­ì¨Ó¦p¦¹^^   §Ú³]ÅܼƮÉÀ³ÁקK¨Ï¥Î Excel ªº¤w¨Ï¥Îªº ÃöÁä¦r

TOP

        ÀR«ä¦Û¦b : ¤H¨ÆªºÁ}Ãø»PµZ¿i¡A´N¬O¤@ºØ¦ÒÅç¡C
ªð¦^¦Cªí ¤W¤@¥DÃD