View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
BOONER BOONER is offline
external usenet poster
 
Posts: 18
Default Find specific text and return coordinates

Thanks Rick,

I was able to incorporate this nicely. Figured out the line below too.
Thanks a lot

"BOONER" wrote:

What does this line do?


Set frng = Cells.Find(what:=FindMe, LookIn:=xlFormulas)


"Rick Hansen" wrote:

Good Morning Booner-- Here try this code and see if what your looking for.
Post me back if you have questions.
enjoy, Rick (Fbks, Alaska)

Option Explicit

Function FindStr(FindMe As String) As String
Dim frng As Range

Set frng = Cells.Find(what:=FindMe, LookIn:=xlFormulas)
If Not frng Is Nothing Then
FindStr = frng.Offset(1, 0).Address(1, 1, xlA1)
Else
MsgBox ("Me, not found")
End If
End Function

Sub testIt()

Debug.Print FindStr("Me")
End Sub




"BOONER" wrote in message
...
I need a macro that will find a cell containing given text (in one
workbook),and then return the cooridinates (column and row) of the cell

below
it, to be used in a formula in another workbook.