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

[µo°Ý] ¦p¦ó²¾°£°}¦C¤º­«½Æªº³¡¤À(STRING)

¦^´_ 9# ­ã´£³¡ªL


    «e½ú¦n
½Ð±Ð«e½ú ªþ¥ó½d¨Ò­n¾ã²z¤£­«½Æ«~¸¹,­þ¸Ì¿ù¤F?

¤£­«½Æ_20210915.zip (297.6 KB)

TOP

¦^´_ 11# n7822123

¨S¥Î¹LInStr¾Þ§@

¾Ç²ß¤F ·PÁ¤j¤j¤À¨É
¥Î¥\¨ì¥@¬É¥½¤é¨º¤@¤Ñ¡ã¡ã¡ã

TOP

¦^´_ 9# ­ã´£³¡ªL

·PÁ­㴣³¡ªLª©¥D¼ö¤ß¦^ÂÐ

¬Ý¤F8¼ÓM¤j¸Ñ»¡

©úÁA¤F !

ÁÂÁÂ
¥Î¥\¨ì¥@¬É¥½¤é¨º¤@¤Ñ¡ã¡ã¡ã

TOP

¦^´_ 8# ML089

·PÁÂM¤j

§A¤@¥ÎKey¨ú¥N­ì¦³ªºE
¦A¥[¤W»¡©ú ¤@¤Á´N²M·¡¤F

²z¸Ñ¦p¤U:
§@ªk¨ä¹ê¬O¥Î¦r¨åªºKey¤£·|­«½Æªº¯S©Ê
§â°}¦C­È¥[¨ì¦r¨åKey­È
³Ì«á¦A¦L¥XKey­È´N¬O¤£­«½Æªºµ²ªG¤F!
¥Î¥\¨ì¥@¬É¥½¤é¨º¤@¤Ñ¡ã¡ã¡ã

TOP

¥»©«³Ì«á¥Ñ n7822123 ©ó 2020-5-18 12:46 ½s¿è

¦^´_ 10# ­ã´£³¡ªL


«¢«¢¡A·PÁ·ǤjªÈ¥¿~~~ ¬O§Ú¤í¦Ò¼{¤F

­×¥¿µ{¦¡
  1. Sub test()
  2. Arr = Array("XX", "aa", "ab", "ab", "ab", "XX", "ab")
  3. T$ = ""
  4. For Each Item In Arr
  5.   If InStr(" " & T$ & " "," " &  Item & " ") = 0 Then T = Trim(T & " " & Item)
  6. Next
  7. Brr = Split(T, " ")
  8. End Sub
½Æ»s¥N½X
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

¦^´_ 7# n7822123


If InStr(" " & T$ & " "," " & Item & " ") = 0 Then T = Trim(T & " " & Item)
¥Î¤À¹j²Å¸¹±N¦r¦ê¥]ÂЦA¤ñ¹ï, ÁקK¿ù§P,
¨Ò¦p:"AA", "AAA", "±i¤T", "±i¤T­¦" ·|¦³©Ò²V²c~~

TOP

¥»©«³Ì«á¥Ñ ­ã´£³¡ªL ©ó 2020-5-18 11:46 ½s¿è

¦^´_ 6# li_hsien

D(Key) = Item
¥i±NKey¤ñ³ë¬°¤£¦Pªº¤H, ¦Ó¨C¤@­Ó¤H­I­Ó¥]¥], ³o¥]¥]¥i¸Ë¥ô¦óªF¦è(Item),
Key­È¬O°ß¤@ªº(¨C­Ó¤H¦b¥@¤W³£¬O°ß¤@ªº), ¦ÓItem¥i½á¤_¨ä¬ÛÃöÁpªº¤º®e, ©Î¬°ªÅ(¥]¥]¤£¸ËªF¦è),
¦]¬°¥Øªº¥u¬O­n¨ú±o¤£­«ÂЭÈ(§YKey­È), ©Ò¥H¥ÎªÅ¦r²Å""¬°Item,
__¥ç§Y¨C¤@­Ó¤H³£´®­ÓªÅ¥]¥], »{¤H¤£»{¥]
D(Key)=""
D(Key)=1
D(Key)="A"
³£¥i¥H±o¨ì¬Û¦P®ÄªG, 1¤ÎA¬OÀH·Nµ¹ªº,¦ý¦b³o¸Ì²@µL·N¸q~~


================================

TOP

¦^´_ 6# li_hsien

­ì¥ý
For Each E In AR
    D(E) = ""
Next
AR = D.KEYS


§ï¬°¡A±N E §ï¬° Key¡A¬O§_¤ñ¸û¦³·Pı
For Each Key In AR
    D(Key) = ""
Next
AR = D.KEYS


¦]¬°¦r¨å°}¦C D(Key)¸ÌªºKey¤£·|¦³­«½Æ­È¡A
·í Key ±q AR °}¦C¨ú¥X¦³­«½Æ­È®É¡A·|¥H«e¤@­Ó¬Û¦PKey­Èªº D(Key) ¬°¦ì¸m¡C


D(Key) = ""¡A«á­±½á­È¬O¬Æ»ò¤£­«­n¡A¦]¬°«á­±¥Î D.KEYS ¨ú¥X¤£­«½Æ­È¡C


~ ­Ó¤H¸ÑŪ¡A¨Ñ§A°Ñ¦Ò ~
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

¦^´_ 1# PKKO

´£¨Ñ¤@­Ó¤£¨Ï¥Î¦r¨åª«¥óªº¼gªk

Arr ³B²z¹L«á ±o¨ì¤@­Ó ¤£­«½Æªº Brr °}¦C
  1. Sub test()
  2. Arr = Array("XX", "aa", "ab", "ab", "ab", "XX", "ab")
  3. T$ = ""
  4. For Each Item In Arr
  5.   If InStr(T$, Item) = 0 Then T = Trim(T & " " & Item)
  6. Next
  7. Brr = Split(T, " ")
  8. End Sub
½Æ»s¥N½X
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

¦^´_ 2# GBKEE

2014¦~ªº¤å³¹¨ì¤F2020ÁÙ¬O«D±`¹ê¥Î

³o¤èªkÀ°§Ú¸Ñ¨M°}¦C²¾°£­«½Æªº°ÝÃD

¹ï©ó¦r¨åªº¥Îªk¤£¬O«Ü²M·¡
¤@ª½¤£À´¬°¤°»ò
  1. For Each E In AR
  2.     D(E) = ""
  3. Next
  4. AR = D.KEYS
½Æ»s¥N½X
¥i¥H¹F¨ì²¾°£­«½Æªº®ÄªG

§Ú¬Ý¤F¤U¤èªº¦^ÂÐÁÙ¬O¤£²M·¡@@

¦A½Ðª©¥D«ü±Ð

ÁÂÁÂ
¥Î¥\¨ì¥@¬É¥½¤é¨º¤@¤Ñ¡ã¡ã¡ã

TOP

        ÀR«ä¦Û¦b : ·R¤£¬O­n¨D¹ï¤è¡A¦Ó¬O­n¥Ñ¦Û¨­ªº¥I¥X¡C
ªð¦^¦Cªí ¤W¤@¥DÃD