View Single Post
 
Old 07-29-2022, 08:07 PM
soroush.kalantari soroush.kalantari is offline Windows 10 Office 2016
Competent Performer
 
Join Date: Jun 2021
Posts: 115
soroush.kalantari is on a distinguished road
Default

Quote:
Originally Posted by p45cal View Post
Change your formula in cell B2 to say:
=matchrow(A2,$C$1:$N$10)
copy down if you want.
Put values you're looking for in column A next to the formulae.

Remove all the Dims at the top of the code-module.

Change your function to:
Code:
Function matchrow(x, interval)
Dim a As Range
Set a = interval.Find(x, LookIn:=xlValues, lookat:=xlWhole, MatchCase:=False, searchformat:=False)
If Not a Is Nothing Then matchrow = a.Row Else matchrow = "Not found"
End Function
Thank you veru much. The problem was solved.
Reply With Quote