+ Reply to Thread
Results 1 to 6 of 6

Auto Upper on certain cells.

  1. #1
    Forum Contributor
    Join Date
    10-03-2005
    Posts
    183

    Auto Upper on certain cells.

    Hi

    Is there a way to automatically set the Font to capitals, or UPPER, for all text inserted in certain cells...


    Or do I have to use an on event, macro that changes the text to UPPER after text is inserted?


    Thanks

  2. #2
    K Dales
    Guest

    RE: Auto Upper on certain cells.

    You could use a font that only has uppercase characters; but other than that
    there is no built-in way to do it so you would need to use an event procedure
    for the worksheet_change event.
    --
    - K Dales


    "Ctech" wrote:

    >
    > Hi
    >
    > Is there a way to automatically set the Font to capitals, or UPPER, for
    > all text inserted in certain cells...
    >
    >
    > Or do I have to use an on event, macro that changes the text to UPPER
    > after text is inserted?
    >
    >
    > Thanks
    >
    >
    > --
    > Ctech
    >
    >
    > ------------------------------------------------------------------------
    > Ctech's Profile: http://www.excelforum.com/member.php...o&userid=27745
    > View this thread: http://www.excelforum.com/showthread...hreadid=528142
    >
    >


  3. #3
    Ron de Bruin
    Guest

    Re: Auto Upper on certain cells.

    You can do this with Data>Validation maybe

    Select A1
    Data Validationchoose custom)

    =EXACT(A1,UPPER(A1))

    You must type in Uppercase now


    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "K Dales" <[email protected]> wrote in message news:[email protected]...
    > You could use a font that only has uppercase characters; but other than that
    > there is no built-in way to do it so you would need to use an event procedure
    > for the worksheet_change event.
    > --
    > - K Dales
    >
    >
    > "Ctech" wrote:
    >
    >>
    >> Hi
    >>
    >> Is there a way to automatically set the Font to capitals, or UPPER, for
    >> all text inserted in certain cells...
    >>
    >>
    >> Or do I have to use an on event, macro that changes the text to UPPER
    >> after text is inserted?
    >>
    >>
    >> Thanks
    >>
    >>
    >> --
    >> Ctech
    >>
    >>
    >> ------------------------------------------------------------------------
    >> Ctech's Profile: http://www.excelforum.com/member.php...o&userid=27745
    >> View this thread: http://www.excelforum.com/showthread...hreadid=528142
    >>
    >>




  4. #4
    Forum Contributor
    Join Date
    10-03-2005
    Posts
    183
    That works fine... however very enoying for people to get an error message if they don't type in UPPERCASE.


    How would you do an on event macro?

  5. #5
    Forum Contributor
    Join Date
    10-03-2005
    Posts
    183
    Can I have a on event on a set cells? As I want the macro to run just when the text in 4 cells is changed... A1, G5, H3, C17

  6. #6
    Ron de Bruin
    Guest

    Re: Auto Upper on certain cells.

    See
    http://www.mvps.org/dmcritchie/excel/proper.htm
    and
    http://www.cpearson.com/excel/case.htm

    You can try

    Private Sub Worksheet_Change(ByVal Target As Excel.Range)
    If Not Application.Intersect(Range("a1,a6,b1,b6"), Target) Is Nothing Then
    Target.Formula = StrConv(Target.Formula, vbUpperCase)
    End If
    End Sub






    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "Ctech" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Can I have a on event on a set cells? As I want the macro to run just
    > when the text in 4 cells is changed... A1, G5, H3, C17
    >
    >
    > --
    > Ctech
    >
    >
    > ------------------------------------------------------------------------
    > Ctech's Profile: http://www.excelforum.com/member.php...o&userid=27745
    > View this thread: http://www.excelforum.com/showthread...hreadid=528142
    >




+ 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