- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 257
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-11-27
|
¦^´_ 7# lone_tiger0303 - Private Sub CommandButton1_Click()
- Dim Ay(3, 2), My As Range, A As Range
- Ay(0, 0) = 0: Ay(0, 1) = "©¾¸Û«È": Ay(1, 0) = 9.1: Ay(1, 1) = "¤[¥¼¦^«È": Ay(2, 0) = 12.1: Ay(2, 1) = "¬y¥¢«È"
- With Sheet1
- For Each A In .Range(.[A2], .[A65536].End(xlUp))
- Set My = .Columns("Y").Find(A, lookat:=xlWhole)
- If Not My Is Nothing Then A.Offset(, 4) = My.Offset(, 1)
- If A.Offset(, 18) < A.Offset(, 4) Then A.Offset(, 18) = ""
- If A.Offset(, 18) > A.Offset(, 4) And A.Offset(, 19) = "" Then A.Offset(, 19) = DateAdd("m", 3, A.Offset(, 18))
- If Date > A.Offset(, 19) Then A.Offset(, 18).Resize(, 2) = ""
- Next
- Set rng = .Range(.[E2], .[E65536].End(xlUp))
- For Each A In rng
- If IsDate(A) Then
- m = Application.Max(0, Round((Date - A) / 30, 2))
- k = Application.VLookup(m, Ay, 2)
- A.Offset(, 11).Resize(, 3) = Array(m, k, A.Offset(, -3) & "-" & k)
- End If
- Next
- End With
- End Sub
½Æ»s¥N½X |
|