- ©«¤l
- 1446
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 1470
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Excel 2010 & 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2020-7-15
- ³Ì«áµn¿ý
- 2024-11-28
|
¥»©«³Ì«á¥Ñ Andy2483 ©ó 2022-12-14 16:00 ½s¿è
ÁÂÁ½׾Â,ÁÂÁ¦U¦ì«e½ú
«á¾ÇÁÙ¨S¤W½×¾Â«e·|¥ÎWIith ~End WIith,ı±o¥i¥H¶]´N¦n,¯Ó®É´Nºâ¤F!
®É¶¡¬y³u,Àɮ׸ê®ÆÅܤj,«½ÆFIND()¤ÓºC¤F
¤W½×¾Â¾Ç²ß°}¦C»P¦r¨å«á,¦³¨Çµ{¦¡½Xì¨Ó 1 ¤ÀÄÁªºÂ¤èªkµ{§Ç,§ï°}¦C&¦r¨å«á²{¦b¥un 0.1 ¬í
¥H¤U¬O³o¥DÃD½d¨Ò¥Î¥H«e¨S¦³¥Î°}¦C©M¦r¨åªºÂ¤èªk:
³s«Å§i³£¤£¦b©I,«Å§i¤@ÓÅܼƥi¯à¥i¥H²¤Æ«Ü¦h¦æµ{¦¡½X
Sub test_20221214()
AC_WO_NA = ActiveWorkbook.Name
Workbooks.Add
[A1] = "N0"
[B1] = "¤é´Á"
[C1] = "®É¶¡"
[D1] = "³W®æ"
[E1] = "¼ÆÈ"
[F1] = "MX"
N = 1
With Workbooks(AC_WO_NA).Sheets("SOS")
For i = 3 To .[D65536].End(xlUp).Row
If .Cells(i, "D") Like "*##/## *:* *-* ªø* *#*¡B*" = True Then
R = R + 1
C = 0
For j = 1 To Len(.Cells(i, "D"))
If Mid(.Cells(i, "D"), j, 5) Like "##/##" = True Then
C = C + 1
N = N + 1
Cells(N, 1) = "'" & R & "." & C
Cells(N, 2) = Mid(.Cells(i, "D"), j, 5)
End If
If Mid(.Cells(i, "D"), j, 5) Like "##:##" = True Then
Cells(N, 3) = Mid(.Cells(i, "D"), j, 5)
End If
If Mid(.Cells(i, "D"), j, 99) Like " AA-* ªø*" = True Then
Cells(N, 4) = Mid(.Cells(i, "D"), j + 1, InStr(Mid(.Cells(i, "D"), j, 99), " ªø") - 2)
End If
If Mid(.Cells(i, "D"), j, 99) Like " ªø#*¡B*" = True Then
Cells(N, 5) = Mid(.Cells(i, "D"), j + 2, InStr(Mid(.Cells(i, "D"), j, 99), "¡B") - 3)
End If
Next
End If
Next
End With
M = 0
For i = 2 To [A65536].End(xlUp).Row + 1
If Mid(Cells(i, 1), 1, InStr(Cells(i, 1), ".")) = Mid(Cells(i + 1, 1), 1, InStr(Cells(i + 1, 1), ".")) Then
If Cells(i, 5) > M Then
N = i
M = Cells(i, 5)
End If
If Cells(i + 1, 5) > M Then
N = i + 1
M = Cells(i + 1, 5)
End If
Else
Cells(N, 6) = "V"
M = 0
End If
Next
[B:B].NumberFormatLocal = "yyyy/m/d"
Cells.Columns.AutoFit
End Sub
¦³½m²ß¤~·|¹J¨ì§xÃø©M¿ù»~! ¤@°_¨Ó¾Ç²ß |
|