- ©«¤l
- 33
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 59
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- office 2013
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-3-10
- ³Ì«áµn¿ý
- 2024-2-7
|
©êºp! ¨Sª`·N±zªºÅv
±NG1¿é¤J¼Æ¦r§Y¥i±Ò°Êµ{¦¡
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$G$1" Then
Dim I As Long
Dim J As Long
Application.ScreenUpdating = False
Call LASTCell(J)
For I = 2 To J
If Len(Sheets("SHEET1").Range("C" & I)) = 18 Or Right(Sheets("SHEET1").Range("C" & I), 1) = "N" Then
Sheets("SHEET1").Range("D" & I) = "·s"
End If
If Len(Sheets("SHEET1").Range("C" & I)) = 15 Then
Sheets("SHEET1").Range("D" & I) = "ÂÂ"
If Sheets("SHEET1").Range("A" & I) <> Sheets("SHEET1").Range("A" & I + 1) Then
Call INSERT(I)
Sheets("SHEET1").Range("A" & I + 1 & ":D" & I + 1).Value = Sheets("SHEET1").Range("A" & I & ":D" & I).Value
Sheets("SHEET1").Range("C" & I + 1) = Left(Sheets("SHEET1").Range("C" & I), 6) & "19" & Right(Sheets("SHEET1").Range("C" & I), 9) & "N"
Sheets("SHEET1").Range("D" & I + 1) = "·s"
I = I + 1
J = J + 1
End If
End If
Next
End If
End Sub
Sub LASTCell(J As Long)
With Sheets("SHEET1").Range("A:A")
Set X = .Find(What:="", After:=.Cells(.Cells.Count), _
LookIn:=xlValues, LookAt:=xlWhole, SearchDirection:=xlNext)
If Not X Is Nothing Then J = X.Row + 2
End With
End Sub
Sub INSERT(I As Long)
'
Rows(I + 1 & ":" & I + 1).Select
Selection.INSERT Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
End Sub |
-
-
°õ¦æ«e.jpg
(211.91 KB)
-
-
°õ¦æ«á.jpg
(219.54 KB)
|