这个宏实现跨sheet的查询定位
Sub test1()
'
' test1 Macro
' seven 记录的宏 2005-12-8
'
Dim temp
Sheets("Sheet1").Select
Cells.Find(What:="test1", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
temp = Range("B1")
Sheets("Sheet2").Select
Range("B1").Cells = temp
temp = Range("B1").Address
MsgBox (temp & " " & Range(temp).Cells)
End Sub
另外一种方法
Function test2()
Dim row1
Sheet4.Select
row1 = Cells.Find(What:=2214120300#, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).row
temp1 = Cells(row1, 4)
tmep2 = Cells(row1, 6)
MsgBox (temp1)
Sheet3.Select
End Function
你可以使用这个链接引用该篇文章 http://publishblog.blogchina.com/blog/tb.b?diaryID=3810263