capital letters and cell value
Hi
change the line
If Cell.Value = Range("newname").Value Then
ro
If lcase(Cell.Value) = lcase(Range("newname").Value) Then
--
Regards
Frank Kabel
Frankfurt, Germany
caroline wrote:
I am trying to see if a name already exists in a list. It
works with the following code (except that it does not
recognise capital letters, for instance it will not
detect that Smith and smith are the same). I tried also
with Cell.text instead of Cell.value, but it gives me the
same problem. Any idea?
Dim Var As Range
Set Var = Range("list")
Dim Cell As Range
For Each Cell In Var
If Cell.Value = Range("newname").Value Then
MsgBox "This name already exists"
Exit Sub
End If
Next Cell
|