+ Reply to Thread
Results 1 to 3 of 3

How do I make some columns all caps and others proper?

  1. #1
    Registered User
    Join Date
    04-15-2004
    Location
    Massachusetts
    Posts
    7

    How do I make some columns all caps and others proper?

    I am new to excel and do not have macro experience. I wd like to make columns 1-6 All Caps when i hit tab or enter. then I want another column to format proper caps when hit tabe or enter.

    I copied a macro from this forum to make the first 6 columns ALL CAPS which is working beautifully, see following:

    Private Sub Worksheet_Change(ByVal Target As Excel.Range)
    If Target.Column > 6 Then Exit Sub
    On Error GoTo ErrHandler
    Application.EnableEvents = False
    Target.Formula = UCase(Target.Formula)
    ErrHandler:
    Application.EnableEvents = True
    End Sub


    How do i now make column 7 format proper?
    Thank you.

    RMM30
    Massachusetts

  2. #2
    Bernie Deitrick
    Guest

    Re: How do I make some columns all caps and others proper?

    rmm30,

    Private Sub Worksheet_Change(ByVal Target As Excel.Range)
    If Target.Cells.Count > 1 Then Exit Sub
    On Error GoTo ErrHandler
    Application.EnableEvents = False
    If Target.Column <= 6 Then
    Target.Value = UCase(Target.Value)
    Else
    Target.Value = Application.Proper(Target.Value)
    End If
    ErrHandler:
    Application.EnableEvents = True
    End Sub

    HTH,
    Bernie
    MS Excel MVP


    "rmm30" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I am new to excel and do not have macro experience. I wd like to make
    > columns 1-6 All Caps when i hit tab or enter. then I want another
    > column to format proper caps when hit tabe or enter.
    >
    > I copied a macro from this forum to make the first 6 columns ALL CAPS
    > which is working beautifully, see following:
    >
    > Private Sub Worksheet_Change(ByVal Target As Excel.Range)
    > If Target.Column > 6 Then Exit Sub
    > On Error GoTo ErrHandler
    > Application.EnableEvents = False
    > Target.Formula = UCase(Target.Formula)
    > ErrHandler:
    > Application.EnableEvents = True
    > End Sub
    >
    >
    > How do i now make column 7 format proper?
    >
    >
    > --
    > rmm30
    >
    >
    > ------------------------------------------------------------------------
    > rmm30's Profile:

    http://www.excelforum.com/member.php...fo&userid=8358
    > View this thread: http://www.excelforum.com/showthread...hreadid=378562
    >




  3. #3
    Registered User
    Join Date
    04-15-2004
    Location
    Massachusetts
    Posts
    7
    it worked perfectly. THANK YOU!

+ 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