Excel - Extract words in uppercase

Ask a question



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.

Excel - Copy row if a range of column matches a value
Excel - Calculation between time interval