Uppercase next Lowercase

Manolocs

Active Member
Joined
Mar 28, 2008
Messages
340
Hello, I have to search a long list only column A if there is any word with an Uppercase letter following by the second in Lowercase. Difficult to explain....
Column.........................Column
A.......................................B
Doris Angel.........................""
Ruper michael................Check This
Barack obama................Check This
Ryan Thomas......................""

I know how to capitalize the first letter of the words, but some of them can not be capitalized so I need to check if need or not. Thanks in advance.
 
Last edited:
Maybe it's this - if not post examples and expected results..


Excel 2013
AB
1Adam jonesCheck this
2John smithCheck this
3Joe Bloggs
4John Doe
5Testy mctestCheck this
6CARLS Clark
7MARY/PETER Dustin
8TOM/Paul harrisCheck this
9Testy mctesting testersonCheck this
10Lee Harvey Oswald
11test test test test testCheck this
12Test Test blah blah blah
13oneword
Sheet1
Cell Formulas
RangeFormula
B1=IF(EXACT(MID(A1,FIND(" ",A1&" ")+1,1),UPPER(MID(A1,FIND(" ",A1&" ")+1,1))),"","Check this")
 
Upvote 0

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
@István Hirsh, I notice that returns #VALUE when the cell has only one word, and the rest is working the way I need. It is what I need for the review..... I will copy this to JimM as well. thank you.....
 
Upvote 0
I got the errors for one word in the cell as well. Really thank you for your time :)
Oddly enough, I only get the error if there are cells with a single word in them (i.e - there are therefore no spaces).

I managed to update my code to account for this, but it looks like I may well be too late as you have already found your solution.

For anyone interested, the updated VBA looks like this:

Code:
Sub FlagIncorrectCase()
Application.ScreenUpdating = False
Dim SecondWord As String
Dim Result As String
Dim x() As String
Dim Cell As Range, cRange As Range
LastRow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row
        Set cRange = Range("A1:A" & LastRow)
            For Each Cell In cRange
                x = Split(Cell, " ")
                    If UBound(x) > 0 Then
                        SecondWord = Cell.Value
                            Result = Trim(Split(SecondWord, " ")(1))
                                Cell.Offset(0, 1).Value = Result
                                            If UCase(Left(Cell.Offset(0, 1), 1)) = Left(Cell.Offset(0, 1), 1) Then
                                                Cell.Offset(0, 1).Value = ""
                                            Else
                                                Cell.Offset(0, 1).Value = "Check This"
                                            End If
                    End If
            Next Cell
Application.ScreenUpdating = True
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top