View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz[_2_] JLGWhiz[_2_] is offline
external usenet poster
 
Posts: 1,565
Default search for lowercase letter in two-letter 'word'

If you only need to find lower case of the second letter and do not know the
character, then this should work.

Sub getshorty()
Dim lr As Long, sh As Worksheet, rng As Range
Dim c As Range
Set sh = ActiveSheet
lr = sh.Cells(Rows.Count, 3).End(xlUp).Row
Set rng = sh.Range("C2:C" & lr)
For Each c In rng
If Not IsEmpty(c) Then
i = Mid(c.Value, 2, 1)
If i = LCase(i) Then
Set x = c.Offset(-1, 1)
MsgBox x.Address
End If
End If
Next
End Sub




"ppeer" wrote in message
...
Hi There,

If I find a second character lowercase letter in a word, I have to
identify the cell Offset(-1,1).
The words are like: Mc, Mv, Np and are all positioned in column C.
Also there, we find words like MK,LP,ET.

haven't found a solution yet,

Regards