How to find the address of a cell

A

Annie Creissac

Hello,
I would like to know if a function, such as describe
below, exists in Excel.
I would like to recuperate in another cell the address of
cell (e.g. B23) testing with the content of the cell.
For example find in the spread sheet 'Toto' and give me
the address where you find it e.g. B45.
Thank you in advance.
 
B

BrianB

We cannot use Find in a custom function, so some sort of normal macro i
required.

This is the basic code :-


Code
-------------------
Sub Get_Address()
v1 = "toto"
Set FoundCell = ActiveSheet.Cells.Find(v1)
If FoundCell Is Nothing Then
FoundVal = "NotFound"
Else
FoundVal = FoundCell.Address
End If
MsgBox (FoundVal)
End Sub
 
D

Don Guillett

Or

Sub findtoto()
On Error Resume Next
MsgBox Cells.Find("TOTO").Address
End Sub
 
Top