Ask Experts Questions for FREE Help !
Ask
    navraj1987's Avatar
    navraj1987 Posts: 2, Reputation: 1
    New Member
     
    #1

    May 16, 2013, 02:01 AM
    Highlight Uppercase in Excel
    Hi All,

    I need to highlight the cells where ever the cell contains uppercase case letters.

    Ex. Cell A1 as AAA
    Cell A2 as bbb

    Here the result should be highlighted in AAA and bbb remains the same.

    I have macro for this and given that below with this message. However, I need to select a range for this.

    Sub OnlyUpper()
    Dim cell As Range
    For Each cell In Selection
    If cell.Value = UCase(cell.Value) Then
    If cell.Value <> "" Then
    cell.Font.ColorIndex = 3 'make font color = red
    End If
    End If
    Next
    End Sub

    Thanks in advance for you help.

    Regards,
    Navraj Dilly Batcha
    JBeaucaire's Avatar
    JBeaucaire Posts: 5,426, Reputation: 997
    Software Expert
     
    #2

    May 21, 2013, 07:16 AM
    So your macro above is working, you just don't like having to select cells first?

    How about this then:

    Code:
    Sub OnlyUpper()
    Dim cell As Range
    
    For Each cell In ActiveSheet.UsedRange
        If Len(cell.Value) > 0 Then
            If cell.Value = UCase(cell.Value) Then cell.Font.ColorIndex = 3 'make font color = red
        End If
    Next cell
    
    End Sub

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Do guys highlight their hair? [ 2 Answers ]

Hey guys what are hair highlights? Is t the same as hair dye? Do guys highlight their hair too or is it mainly for girls?

Mysql and excel query to extract all the UPPERCASE strings from a particular column [ 0 Answers ]

Mysql and excel query to extract all the UPPERCASE strings from a particular column For example: Suppose these are the entries +--------------+ The output should be |Names | |--------------+ RONEY |RONEY | AKSHAY |Vinay | STELLA

Highlight black hair [ 2 Answers ]

I would like to highlight my hair which is black. Do I need to bleach if the color I would like to achieve is a chocolate brown or caramel brown?

Highlight Disaster [ 1 Answers ]

I am a women of color and I have dark brown hair and yesterday I went to the salon and got highlights. My highlights are a very light brownish blonde. After I left the salon I begin to hate how light the highlights are. What can I do to tone them down or go back to my dark brown and how long do I...


View more questions Search