'this will scan the column then set the upper/lower. run: SplitUpperLower
'-----------
Sub SplitUpperLower()
'-----------
Dim vRet
range("A2").select
While ActiveCell.Value <> ""
vRet = TestCase(ActiveCell.Value)
Select Case vRet
Case "UPPER"
ActiveCell.Offset(0, 1).Value = ActiveCell.Value
Case "LOWER"
ActiveCell.Offset(0, 2).Value = ActiveCell.Value
End Select
ActiveCell.Offset(1, 0).Select 'next row
Wend
End Sub
'-----------
private Function TestCase(pvWord)
'-----------
Dim vChr
vChr = Left(pvWord, 1)
Select Case Asc(vChr)
Case 65 To 90
'its upper case
TestCase = "UPPER"
Case 67 To 122
'lower case
TestCase = "LOWER"
Case Else
'neither ,not letter
TestCase = "neither"
End Select
End Function
Bookmarks