- ©«¤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
        
|
¦^´_ 11# yeh6712
¸Ô¬Ý 10# ªº¹Ï¥Ü
«ºâ¨Æ¥ó ,Change ¨Æ¥ó »Ý¤G¾Ü¤@°õ¦æ,- Option Explicit
- Private Sub Worksheet_Calculate()
- Dim i As Integer, M As Variant, S As Integer, Rng As Range
- i = 2
- Do While Cells(i, "F").Formula <> "" '¦³¤½¦¡
- S = 0 '¤£¬O¨k¤k
- If Cells(i, "C") = "¨k" Then
- S = 1 'AÄæ
- ElseIf Cells(i, "C") = "¤k" Then
- S = 4 'DÄæ
- End If
- If S > 0 And Cells(i, "F") > 0 Then
- If Cells(i, "F") < Sheets("¥õª×°_§¤").Columns(S).Cells(2, 1) Then
- M = Application.Match(Cells(i, "F"), Sheets("¥õª×°_§¤").Columns(S), 0)
- ElseIf Cells(i, "F") >= Sheets("¥õª×°_§¤").Columns(S).Cells(2, 1) Then
- M = 2 '100¤À
- End If
- If IsNumeric(M) Then Cells(i, "G") = Sheets("¥õª×°_§¤").Columns(S).Cells(M, 2)
- 'Application.Match ¤u§@ªíªº¨ç¼Æ:¨S¦³§ä¨ì®É¶Ç¦^ ¿ù»~È
- Else
- Cells(i, "G") = ""
- End If
- i = i + 1
- Loop
- End Sub
½Æ»s¥N½X |
|