- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 127
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2025-5-25
               
|
¥»©«³Ì«á¥Ñ Hsieh ©ó 2017-11-10 12:14 ½s¿è
¦^´_ 1# papaya - Private Sub CommandButton1_Click()
- Dim MyRng As Range, MyRng1 As Range
- k = [B2]
- a = [C2]
- Set Rng = Columns("D").Find(k, lookat:=xlWhole)
- mystr = Join(Application.Transpose(Application.Transpose(Rng.Offset(, 1).Resize(, 4))), "")
- s = InStr(mystr, a)
- If s = 0 Then MsgBox "¦¹¦CµL¦¹¥Í¨v": End
- t = Mid(Join(Application.Transpose(Application.Transpose(Rng.Offset(, 6).Resize(, 4))), ""), s, 1)
- For Each c In Range([D2], [D2].End(xlDown))
- Set n = c.Offset(, 1).Resize(, 4).Find(a, lookat:=xlWhole)
- Set m = c.Offset(, 6).Resize(, 4).Find(t, lookat:=xlWhole)
- If Not n Is Nothing And Not m Is Nothing Then
- cnt = cnt + 1
- If MyRng Is Nothing Then
- Set MyRng = n
- Set MyRng1 = m
- Else
- Set MyRng = Union(MyRng, n)
- Set MyRng1 = Union(MyRng1, m)
- End If
- End If
- Next
- MsgBox cnt & "¦¸"
- If cnt > 1 Then
- MyRng.Interior.ColorIndex = 6
- MyRng1.Interior.ColorIndex = 8
- End If
- End Sub
½Æ»s¥N½X |
|