Excel User Group
Microsoft Excel blogs, forums, files. Read, ask questions, provide answers.

UPPER FUNCTION

Latest post Wed, May 21 2008 8:27 AM by Olusoga. 2 replies.
  • Wed, May 21 2008 6:25 AM

    • Olusoga
    • Top 150 Contributor
    • Joined on Wed, May 21 2008
    • Posts 2
    • Points 26

    UPPER FUNCTION

     Hi All,

    Hi All,

    I have Excel 2000 running on my system.

    I have a worksheet with alpanumeric columns, date columns, number columns, letter column and a column with both date and letters.

    Now I want to convert the whole worksheet to Uppercase characters. Each time I do a conversion using the UPPER function, it changes the dates to something else especially in the column with both dates and letters.

    Please can someone give me a walk around the issue or a little macro that will do the conversion while leaving the numbers and dates as is.

    Thank you

    Olusoga

    • Post Points: 21
  • Wed, May 21 2008 6:51 AM In reply to

    • kaak
    • Top 25 Contributor
    • Joined on Fri, Jan 18 2008
    • Edam, Netherlands
    • Posts 30
    • Points 545

     Try something like

    Sub UPPERCASE()

        Dim Cell As Range
       
        For Each Cell In ActiveSheet.UsedRange
       
        If IsNumeric(Cell.Value) Or IsDate(Cell.Value) Then
        Else
           Cell.Value = UCase(Cell.Value)
        End If
       
        Next Cell

    End Sub

     

    • Post Points: 21
  • Wed, May 21 2008 8:27 AM In reply to

    • Olusoga
    • Top 150 Contributor
    • Joined on Wed, May 21 2008
    • Posts 2
    • Points 26

     This Sub Routine worked just fine, Thanks a million

    Right Hug

    • Post Points: 5
Page 1 of 1 (3 items) | RSS
Copyright Excel User Group and the relevant contributors, 2008. All Trade Marks acknowledged. This site is a peer-to-peer site and NOT affiliated in any way to Microsoft Corp. All rights reserved.