Hey guyz!
Can some one plz help me out here i need a search macro that can read
read the search string in excel and then search for it out side excel
in another specified location.
I got a search macro from the web can any of you help me modify it cuz
i am a beginner i really dont know macros:(
Search Macro
Public Sub Test()
Dim SR As Integer
Dim ER As Integer
Dim SC As Integer
Dim EC As Integer
Dim RowVar As Integer
Dim ColVar As Integer
Dim found As Boolean
'Change the indexes for your own Row range from 1 to 65536
SR = 1
ER = 20
'Change the indexes for your own Column range from 1 to 256 - in
English from "A" to "IV"
SC = 1
EC = 10
found = False
For RowVar = SR To ER
For ColVar = SC To EC
If Not found Then 'This ensures that you stop at the first
occurrence
If Cells(RowVar, ColVar).Formula = "Angstrom" Then 'This is
where your search text goes
Cells(RowVar, ColVar).Select
found = True
End If
End If
Next
Next
End Sub
Set xlApp = Nothing
End Sub
--
Maria.N
------------------------------------------------------------------------
Maria.N's Profile:
http://www.excelforum.com/member.php...o&userid=36235
View this thread:
http://www.excelforum.com/showthread...hreadid=564681