+ Reply to Thread
Results 1 to 5 of 5

Change case of entered text

  1. #1
    Registered User
    Join Date
    04-28-2006
    Posts
    5

    Question Change case of entered text

    I have an extensive spreadsheet and would like a simple way to convert all of the text entered into column B to uppercase. Right now it is a mixture of upper and lower. Any help?

  2. #2
    Chip Pearson
    Guest

    Re: Change case of entered text

    Try the following macro:

    Sub ConvertToUpper()
    Dim Rng As Range
    Application.EnableEvents = False
    For Each Rng In Application.Intersect(ActiveSheet.UsedRange, _
    Range("B:B")).SpecialCells(xlCellTypeConstants)
    Rng.Value = UCase(Rng.Text)
    Next Rng
    Application.EnableEvents = True
    End Sub



    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com

    "Joanie" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > I have an extensive spreadsheet and would like a simple way to
    > convert
    > all of the text entered into column B to uppercase. Right now
    > it is a
    > mixture of upper and lower. Any help?
    >
    >
    > --
    > Joanie
    > ------------------------------------------------------------------------
    > Joanie's Profile:
    > http://www.excelforum.com/member.php...o&userid=33956
    > View this thread:
    > http://www.excelforum.com/showthread...hreadid=537299
    >




  3. #3
    JE McGimpsey
    Guest

    Re: Change case of entered text

    See

    http://www.mvps.org/dmcritchie/excel/proper.htm#upper

    If you're not familiar with macros, see


    http://www.mvps.org/dmcritchie/excel/getstarted.htm



    In article <[email protected]>,
    Joanie <[email protected]> wrote:

    > I have an extensive spreadsheet and would like a simple way to convert
    > all of the text entered into column B to uppercase. Right now it is a
    > mixture of upper and lower. Any help?


  4. #4
    Garage YaKa
    Guest

    Re: Change case of entered text

    Convert to Uppercase in colonne B When entered

    http://cjoint.com/?eCvqjXuqjI

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Column = 2 And Target.Count = 1 Then
    Target = UCase(Target)
    End If
    End Sub

    Cordially JB


  5. #5
    Chip Pearson
    Guest

    Re: Change case of entered text

    You should set EnableEvents to False in this code.

    Private Sub Worksheet_Change(ByVal Target As Range)
    Application.EnableEvents = False
    If Target.Column = 2 And Target.Count = 1 Then
    Target = UCase(Target)
    End If
    Application.EnableEvents = True
    End Sub

    Without turning off EnableEvents, the Change code will change a
    cell, which causes Change to run again, which changes a cell,
    which caues Change to run again, and so on and on.


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com



    "Garage YaKa" <[email protected]> wrote in message
    news:[email protected]...
    > Convert to Uppercase in colonne B When entered
    >
    > http://cjoint.com/?eCvqjXuqjI
    >
    > Private Sub Worksheet_Change(ByVal Target As Range)
    > If Target.Column = 2 And Target.Count = 1 Then
    > Target = UCase(Target)
    > End If
    > End Sub
    >
    > Cordially JB
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1