Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro for searching out side excel??


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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Macro for searching out side excel??

what do you mean specifically by search outside Excel

Your macro only has relevance to searching a worksheet and then it is very
inefficent at that.

--
Regards,
Tom Ogilvy


"Maria.N" wrote:


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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I have dual monitors, how can I view excel workbooks side by side Johnson County Excel Worksheet Functions 1 September 19th 08 04:33 PM
Excel Pivot Tables-How to put two Data Varibles side by side BillyBob Excel Worksheet Functions 2 January 23rd 07 10:35 PM
excel should cut & paste lists side by side to save paper Richierich Excel Worksheet Functions 1 March 10th 06 12:42 AM
can you create a macro to compare two different doc side by side Welby Excel Worksheet Functions 1 September 30th 05 07:15 PM
How to print 2 Excel pages side by side on 1 printed page? Kathy Install Excel Discussion (Misc queries) 1 September 29th 05 05:03 PM


All times are GMT +1. The time now is 07:08 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"