View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default search and return cell address

Since you made the effort to do it yourself, you may like this.

Option Explicit
Sub Findnum()
Dim mc As String
Dim myfind As Range
Dim mynum As Long
mc = "a"
mynum = InputBox("Enter number desired")
MsgBox mynum
Set myfind = Columns(mc).Find(What:=mynum, _
After:=Cells(1, mc), LookIn:=xlValues, _
LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False)
If Not myfind Is Nothing Then Range("a1") = myfind
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Fan924" wrote in message
...
On Dec 24, 3:27 pm, Fan924 wrote:
How do I find the address of the cell it is found in?


Thanks, I found what I need
Range("A1").Value = ActiveCell.Address