作者:乔山办公网日期:
返回目录:excel表格制作
在本表中插入一知个表单命令道按钮,然后将下面的代码指定到这个版按钮就行。
Sub 提示()
If Not Range("a:a").Find("快运权") Is Nothing Then
MsgBox "注意"
End If
End Sub
宏代码如下百:
Sub 筛选()
For i = 1 To Sheets(1).[j65536].End(3).Row
If Sheets(1).Cells(i, 10) Like "*花都*" Then '注凡度Sheet1J列含有“花都”二字的记录版均被视为权符合要求。
a = Sheets(2).[j65536].End(3).Row + 1
Sheets(1).Range(i & ":" & i).Copy Sheets(2).Range(a & ":" & a)
End If
Next
End Sub
用下面zhidao代码吧
Sub 查找专属()
t = TextBox1.Text
Sheets("sheet2").Select
For Each a In ActiveSheet.UsedRange
b = Format(a.Value)
If Format(a.Value) = t Then a.Select: Exit Sub
Next
Sheets("sheet3").Select
For Each a In ActiveSheet.UsedRange
b = Format(a.Value)
If Format(a.Value) = t Then a.Select: Exit Sub
Next
Sheets("sheet1").Select
MsgBox "没找到"
End Sub