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

[µo°Ý] ¸ê®Æ­åªR+¥[®Ø½u

¦^´_ 4# v03586

¦A¤W¶ÇÀɮ׬ݬÝ
2#µ{¦¡½X °õ¦æ«á¦p¹Ï

·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ v03586 ©ó 2017-7-29 10:28 ½s¿è

¦^´_ 2# GBKEE


    ªO¤j¥[¤J¤F¥½½X³W«h«á, µ{¦¡¶]§¹Åܦ¨ ¥u«O¯d¥½½X, ¡yAAP , QQP ¡z
    ¤£¬OÅܦ¨«O¯d¹³¹Ï¤ù¤¤«O¯d¬õ¦â¦rÅ鳡¤À QQ
    §Ú«öF8 ¥h¶]  ·|Åܦ¨¤U­±³o¬q §â¥LÅܦ¨ AAP , QQP
  1. For i = 0 To UBound(sp) - IIf(Msg, 2, 1)
  2.                 E = Replace(E, sp(i) & "-", "")
  3.                 'Replace ¨ç¼Æ ¶Ç¦^¤@­Ó¦r¦ê , ¸Ó¦r¦ê¤¤«ü©wªº¤l¦r¦ê¤w³Q¨ú¥N¦¨¥t¤@¤l¦r¦ê, ¨Ã¥B¨ú¥Nµo¥Íªº¦¸¼Æ¤]¬O«ü©wªº
  4.             Next
½Æ»s¥N½X

TOP

[ª©¥DºÞ²z¯d¨¥]
  • GBKEE(2017/7/29 10:02): 2#µ{¦¡½X¤w§ó·s , ¦A¸Õ¸Õ¬Ý

¥»©«³Ì«á¥Ñ v03586 ©ó 2017-7-29 09:37 ½s¿è

¦^´_ 2# GBKEE


    ·PÁª©¤jªº¤ä´©,
    ·Q°Ý¤@¤U, ¥Lªº¥½½X³W«h¤£¤@©w¬OQQP ªº¸Ü, ¤]¥i¯à¬O§OªºAAP ¤§Ãþªº , ¤£©T©w, ¬OÁÙ­n¦b¥[¤@¦ê
  1. For i = 0 To UBound(sp) - IIf(InStr(E, "QQP"), 2, 1) and UBound(sp) - IIf(InStr(E, "AAP"), 2, 1)
½Æ»s¥N½X
³o¼Ë¶Ü?? ½T©w©T©w³W«h¼Ò¦¡±q¥ªÃä¼Æ¨Ó¨â­Ó¡y-¡z¬O­n§R°£ªº

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2017-7-29 09:58 ½s¿è

¦^´_ 1# v03586
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex()
  3.     Dim E As Range, sp As Variant, i As Integer, Msg As Boolean, St As String
  4.     St = ",AAP,PPA,QQP,POO,"   '¥½½X³W«h
  5.     With Range("h2").CurrentRegion
  6.     'Range.CurrentRegion ÄÝ©Ê ¶Ç¦^ Range ª«¥ó¡A¸Óª«¥ó¥Nªí¥Ø«eªº°Ï°ì¡C¥Ø«e°Ï°ì¬O«ü¥H¥ô·NªÅ¥Õ¦C¤ÎªÅ¥ÕÄ檺²Õ¦X¬°Ãä¬Éªº½d³ò¡C°ßŪªº¡C
  7.         For Each E In .Cells
  8.            sp = Split(E.Value, "-")
  9.            'Split ¨ç¼Æ ¶Ç¦^¤@­Ó³¯¦C¯Á¤Þ±q¹s¶}©lªº¤@ºû°}¦C , ¥¦¥]§t«ü©w¼Æ¥Øªº¤l¦r¦ê
  10.             Msg = InStr(St, "," & UCase(UBound(sp)) & ",")
  11.             For i = 0 To UBound(sp) - IIf(Msg, 2, 1)
  12.                 E = Replace(E, sp(i) & "-", "")
  13.                 'Replace ¨ç¼Æ ¶Ç¦^¤@­Ó¦r¦ê , ¸Ó¦r¦ê¤¤«ü©wªº¤l¦r¦ê¤w³Q¨ú¥N¦¨¥t¤@¤l¦r¦ê, ¨Ã¥B¨ú¥Nµo¥Íªº¦¸¼Æ¤]¬O«ü©wªº
  14.             Next
  15.         Next
  16.         .BorderAround LineStyle:=xlContinuous, Weight:=xlMedium, ColorIndex:=xlAutomatic
  17.         For Each E In .Cells
  18.             
  19.              With E.Borders(9)  'xlInsideVertical
  20.                 .LineStyle = xlContinuous
  21.                 .ColorIndex = xlAutomatic
  22.                 .TintAndShade = 0
  23.                 .Weight = IIf(E.Offset(1) <> E, xlThick, xlMedium)
  24.             End With
  25.         Next
  26.     End With
  27. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¡i®É¤é²öªÅ¹L¡j¤@­Ó¤H¦b¥@¶¡°µ¤F¦h¤Ö¨Æ¡A´Nµ¥©ó¹Ø©R¦³¦hªø¡C¦]¦¹¥²¶·»P®É¶¡Ävª§¡A¤Á²ö¨Ï®É¤éªÅ¹L¡C
ªð¦^¦Cªí ¤W¤@¥DÃD