MATCH and case sensitivity

A

Alon K

Hi,

I am looking for a way to go around excel's MATCH function's case
insensitivity with text.

say I have a list:

Adam
Lisa
Charles

I want MATCH("lisa",list,0) to be N/A rather than 2

Thanks,
Alon
 
A

Alon K

I created the following function to basically 'fix' the MATCH
function, but it is horribly slow and I would still rather use an
excel function driven solution:


Public Function MATCHCASE(lookup_value As Range, lookup_array As
Range) As Integer
Dim n As Integer
n = 0

MATCHCASE = n
For Each c In lookup_array.Cells
n = n + 1
If lookup_value.Value = c.Value Then
MATCHCASE = n
Exit Function
End If
Next c

End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top