- ©«¤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
        
|
¦^´_ 9# yliu - Private Sub CommandButton1_Click()
- Dim g As Integer, E As Range, C As Range, ³æ¸¹ As String, SS As String, Rng As Range
- Dim i As Integer
- With Sheets("login")
- ³æ¸¹ = .ComboBox1.Value
- Set Rng = .[B9:B19]
- SS = Application.Phonetic(Rng) 'µ²¦X©Ò¦³§Ç¸¹
- End With
-
- With Sheets("final").[A:A]
- If Application.CountIf(.Cells, ³æ¸¹) > 1 Then
- .Replace ³æ¸¹, "=xxx", xlWhole ''Replace ¤èªk
- With .SpecialCells(xlCellTypeFormulas, xlErrors)
- .Cells = ³æ¸¹
- For Each C In .Cells ''¤ñ¹ï¨ì §Ç¸¹ ½ð°£ ¦¹§Ç¸¹
- If InStr(SS, C.Offset(, 1)) Then SS = Replace(SS, C.Offset(, 1), "") 'Replace ¨ç¼Æ
- If SS = "" Then Exit Sub
- Next
- End With
- End If
- For Each E In Rng
- If E = "" Then Exit For
- If InStr(SS, E) Then '¤ñ¹ï¨ì §Ç¸¹
- g = Application.CountA(.Cells) + 1 'Ū¨úAøó¦³¸ê®Æ¼ÆªºÀx¦s®æ¼Æ +1
- i = Application.CountA(Rng)
- .Cells(g, "A").Resize(1) = ³æ¸¹
- .Cells(g, "B").Resize(1, 2) = E.Cells(1).Resize(1, 2).Value
- .Cells(g, "D").Resize(1, 6) = E.Cells(1, 4).Resize(1, 6).Value
- End If
- Next
- End With
- End Sub
½Æ»s¥N½X |
|