How to get the address of a cell with ID using LookUp

I have some problem with Excel LookUp.
I need to find address of the cell where the ID is located.


In this case how can I find the address of the cell where ID 219. If I use the activity LookUp it gives me the address of the cell where the ID is 21999. I thought about using Regex, but I don’t know how to use Regex with LookUp.

I find solution to my question. Maybe this will help someone.

I used this VBA code to get range:

Public Function FindRange(Value As String, MyRange As String) As String
Dim ra As Range
With ActiveSheet.Range(MyRange)
Set ra = .Find(What:=Value, LookIn:=xlValues, LookAt:=xlWhole)
If ra Is Nothing Then
FindRange = “Not Found”
FindRange = Replace(ra.Address, “$”, “”)
End If
End With
End Function

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.