+ Reply to Thread
Results 1 to 7 of 7

Forcing Uppercase

  1. #1
    Registered User
    Join Date
    04-19-2007
    Posts
    50

    Forcing Uppercase

    How do I force Uppercase text in a cell. For example, I want the data entry to be all caps even if the user types in lower case? Is there a formula I can put in the cells. I tried the following formula in cell A25: =Uppercase("A25") and it put #NAME? error in the cell. Please help.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    You need some VBA code

    See link

    http://exceltips.vitalnews.com/Pages...Uppercase.html

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127
    If you don't want to use vba, you can force the user to type in upper case (if that is an option).

    You can set up a data validation. Assuming you are working with cell A1, click on A1-Data-Validations-Custom- =EXACT(A1,UPPER(A1))=TRUE -- Set up an error message (saying "You must enter the information in Caps")

    Admittedly, it does not do exactly what you want, but it is an option.

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    I would recommend VBA better as validation can be deleted

    VBA Noob

  5. #5
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127
    Quote Originally Posted by VBA Noob
    I would recommend VBA better as validation can be deleted

    VBA Noob
    Although protecting the sheet can prevent this, that is a very good point!

    I just know that in some of the reports at my company we cannot apply VBA because the security settings for some employees are too high.

  6. #6
    Registered User
    Join Date
    04-19-2007
    Posts
    50
    I tried using the vba code in the link. It worked but when I delete the data from the cell it gives me an error; "Type mistmatch on the line in red below"

    Private Sub Worksheet_Change(ByVal Target As Range)

    If (IsNull(Target.Value)) Then
    Else
    With Target
    If Not IsNull(.Value) Then
    .Value = UCase(.Value) Else

    End If
    End With
    End If

  7. #7
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    talytech,

    Please read forum rules below and then wrap your code on your last post

    I'm not getting a issue with mine. Prehaps this link might work for you

    http://www.ozgrid.com/VBA/force-case-text.htm

    VBA Noob
    Last edited by VBA Noob; 04-24-2007 at 05:43 PM.

+ 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