cell address code

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

Is there any VBA code for Excel 97 that will return a
specific cell address that can be located only by values
in other cells?
 
Dave

Try

Sub test()
Dim x As String
x = "wx" ' or say 2312
MsgBox Range("B9:B42").Find(What:=x, LookIn:=xlFormulas,
LookAt:=xlWhole).Address
End Sub
--
XL2002
Regards

William
(e-mail address removed)

| Is there any VBA code for Excel 97 that will return a
| specific cell address that can be located only by values
| in other cells?
 
If using Find, allow for it not being found.

Dim oCell As Range

Set oCell = Range("B2:B42").Find(What:=x, LookIn:=xlFormulas,
LookAt:=xlWhole)
If Not oCell Is Nothing Then
Msgbox oCell.Address
End If
 
Back
Top