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

[µo°Ý] ➽➽½Ð°Ý¦p¦ó§R°£(«e­±¤T½Xªº¼Æ¦r)

[µo°Ý] ➽➽½Ð°Ý¦p¦ó§R°£(«e­±¤T½Xªº¼Æ¦r)

¦p¦ó§R°£(¼Æ¦rªº«e­±¤T½X)

§Ú¦³¤@°ï¼Æ¦r
§R°£«e­±¤T½Xªº¼Æ¦r
½Ð°Ý§Ú¸Ó«ç»ò³B²z

¥i¥H°µ¦¨VBA°µ¦¨¶Ü??
©Î¬O¦p¦ó³B²z

«D±`·PÁ¤j®aÀ°¦£,ÁÂÁÂ

ªþ¤W»¡©ú¹Ï¤ù


ªþ¤WÀÉ®×
Q1.rar (22.27 KB)
¾Ç²ß ¾Ç²ß ¤@ª½¾Ç²ß

¦^´_ 1# peter95

Sub ex()
Dim a As Object
Dim x%, QQ%
For Each a In Range([D10], [O10].End(4))
   For x = 1 To Len(a)
      If IsNumeric(Mid(a, x, 1)) = True Then QQ = QQ + 1
      If QQ = 3 Then a.Value = WorksheetFunction.Replace(a, 1, x, ""): QQ = 0: Exit For
   Next
Next

TOP

¦^´_ 2# jcchiang


·PÁ¤j¤jÀ°¦£
¸Ñ¨M§xÂZ§Ú«Ü¤[ªº°ÝÃD

²{¦bÅܱo¦n»´ÃP
·PÁÂ
¾Ç²ß ¾Ç²ß ¤@ª½¾Ç²ß

TOP

¦^´_ 1# peter95
  1. Sub tt()
  2. Dim Arr, i&
  3.     Arr = Range("D10:O" & Range("D10").End(4).Row)
  4.     For i = 1 To UBound(Arr)
  5.         For j = 1 To UBound(Arr, 2)
  6.             If InStr(Arr(i, j), "-") > 0 Then
  7.                 Arr(i, j) = Val(Trim(Mid(Arr(i, j), 6, 7)))
  8.             Else
  9.                 Arr(i, j) = Val(Trim(Mid(Arr(i, j), 5, 7)))
  10.             End If
  11.         Next
  12.     Next
  13.     Range("D10").Resize(UBound(Arr), UBound(Arr, 2)) = Arr
  14. End Sub
½Æ»s¥N½X

TOP

Sub TEST()
Dim Arr, R&, T$, C&, K%
With Range([D10], [O65536].End(3))
     Arr = .Value
     For C = 1 To .Columns.Count
     For R = 1 To .Rows.Count
         T = Arr(R, C)
         If T Like "*.*.*" Then Arr(R, C) = Mid(T, IIf(Left(T, 1) = "-", 6, 5)): K = 1
     Next R
     Next C
     If K = 1 Then .Value = Arr
End With
End Sub

TOP

google"EXCEL°g"  blog  ©Îgoogleºô§}:https://hcm19522.blogspot.com/

TOP

·PÁ¤j®aÀ°¦£¡A¤w¸Ñ¨M
·P®¦
¾Ç²ß ¾Ç²ß ¤@ª½¾Ç²ß

TOP

ÁÂÁ½׾Â,ÁÂÁ¦U¦ì«e½ú
«á¾ÇÂǦ¹©«½m²ß°}¦C,¾Ç²ß¤è®×¦p¤U,½Ð¦U¦ì«e½ú«ü±Ð

°õ¦æµ²ªG:



Option Explicit
Sub TEST_1()
Dim Brr, i&, j%, xA As Range
'¡ô«Å§iÅܼÆ
Set xA = Range([D10], [O65536].End(3)): Brr = xA
'¡ô¥OxAÅܼƬOD~OÄæÀx¦s®æ,¥OBrrÅܼƬO ¤Gºû°}¦C,¥HxAÅܼƭȱa¤J
For i = 1 To UBound(Brr)
'¡ô³]°}¦CÁa¦V°j°é
   For j = 1 To UBound(Brr, 2)
   '¡ô³]°}¦C¾î¦V°j°é
      Brr(i, j) = Mid(Replace(Brr(i, j), "-", ""), 5)
      '¡ô¥O°}¦C­È¥h°£"-"«á,¨ú²Ä5¦r(§t)«áªº¦r¦ê
   Next
Next
xA = Brr
'¡ô¥OxAÅܼƭȬO Brr°}¦C­È
Set xA = Nothing: Erase Brr
'¡ô¥OÄÀ©ñÅܼÆ
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

        ÀR«ä¦Û¦b : ¡i¥Í©R¦b©I§l¶¡¡j¦òªû»¡¡G¡u¥Í©R¦b©I§l¶¡¡C¡v¤HµLªkºÞ¦í¦Û¤vªº¥Í©R¡A§óµLªk¾×¦í¦º´Á¡AÅý¦Û¤v¥Ã¦í¤H¶¡¡C¬JµM¥Í©R¥h¨Ó³o»òµL±`¡A§Ú­Ì§óÀ³¸Ó¦n¦n¦a·R±¤¥¦¡B§Q¥Î¥¦¡B¥R¹ê¥¦¡AÅý³oµL±`¡BÄ_¶Qªº¥Í©R¡A´²µo¥¦¯uµ½¬üªº¥ú½÷¡A¬M·Ó¥X¥Í©R¯u¥¿ªº»ù­È¡C
ªð¦^¦Cªí ¤W¤@¥DÃD