Excel - Extract words in uppercase

July 2017




Issue


I would like to create a formula to extract the word in uppercase in a cell.

Solution


You can try to use this function:

Public Function majuscules(zone) 
Dim sel As Object 
Dim i As Integer 
Application.Volatile 
For Each sel In zone 
    For i = 1 To Len(sel) 
        If Asc(Mid(sel, i, 1)) > 64 And Asc(Mid(sel, i, 1)) < 91 Then 
            majuscules = majuscules & Mid(sel, i, 1) 
        End If 
    Next i 
Next sel 
End Function 

Thanks to gbinforme for this tip.

Related


Published by aakai1056. Latest update on October 25, 2012 at 01:15 PM by Jeff.
This document, titled "Excel - Extract words in uppercase," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).