- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 6# v03586
קï¤F, ¸Õ¸Õ¬Ý- Option Explicit
- Sub Ex()
- Dim E As Range, sp As Variant, i As Integer
- With Range("h2").CurrentRegion
- 'Range.CurrentRegion ÄÝ©Ê ¶Ç¦^ Range ª«¥ó¡A¸Óª«¥ó¥Nªí¥Ø«eªº°Ï°ì¡C¥Ø«e°Ï°ì¬O«ü¥H¥ô·NªÅ¥Õ¦C¤ÎªÅ¥ÕÄ檺²Õ¦X¬°Ãä¬Éªº½d³ò¡C°ßŪªº¡C
- For Each E In .Cells
- sp = Split(E.Value, "-")
- 'Split ¨ç¼Æ ¶Ç¦^¤@Ó³¯¦C¯Á¤Þ±q¹s¶}©lªº¤@ºû°}¦C , ¥¦¥]§t«ü©w¼Æ¥Øªº¤l¦r¦ê
- If UBound(sp) > 2 Then ' ³W«h, ¦³²Ä¤GÓ¡y-¡z,¤~³B¸Ì
- For i = 0 To IIf(UBound(sp) > 2, UBound(sp) - 2, 1)
- E = Replace(E, sp(i) & "-", "")
- 'Replace ¨ç¼Æ ¶Ç¦^¤@Ó¦r¦ê , ¸Ó¦r¦ê¤¤«ü©wªº¤l¦r¦ê¤w³Q¨ú¥N¦¨¥t¤@¤l¦r¦ê, ¨Ã¥B¨ú¥Nµo¥Íªº¦¸¼Æ¤]¬O«ü©wªº
- Next
- End If
- Next
- .BorderAround LineStyle:=xlContinuous, Weight:=xlMedium, ColorIndex:=xlAutomatic
- For Each E In .Cells
- With E.Borders(9) 'xlInsideVertical
- .LineStyle = xlContinuous
- .ColorIndex = xlAutomatic
- .TintAndShade = 0
- .Weight = IIf(E.Offset(1) <> E, xlThick, xlMedium)
- End With
- Next
- End With
- End Sub
½Æ»s¥N½X |
|