+ Reply to Thread
Results 1 to 8 of 8

Convert text to upper

  1. #1
    Registered User
    Join Date
    01-24-2007
    Location
    Melbourne, Australia
    Posts
    79

    Convert text to upper

    Ok before you say "Easy, just use the UPPER function" that's not not what I want.
    If I type abc123 in cell A1 I want it to convert to ABC123 in A1 as soon as I hit enter. I don't think it is possible, but I thought I'd ask.
    Thanks in advance
    Jase

  2. #2
    Forum Contributor Kieran's Avatar
    Join Date
    10-02-2003
    Location
    Perth, Western Australia
    MS-Off Ver
    Office 2003
    Posts
    109

    Convert text to upper

    Jase,

    it is possibel, but you will need to use the worksheet change event to run a macro.

    Paste the following code into the worksheet code for the sheet in question and it should do what you want.

    PHP Code: 
    Private Sub Worksheet_Change(ByVal Target As Range)
        
    Target.Value UCase(Target.Text)
    End Sub 
    Kieran

  3. #3
    Registered User
    Join Date
    01-24-2007
    Location
    Melbourne, Australia
    Posts
    79
    Thanks Kieran,how do I get to the worksheet code?

  4. #4
    Forum Contributor Kieran's Avatar
    Join Date
    10-02-2003
    Location
    Perth, Western Australia
    MS-Off Ver
    Office 2003
    Posts
    109
    An existing example of this can be done is found athere.
    Note how this example is fairly close to your orginal request, did you search the forum first?

  5. #5
    Registered User
    Join Date
    01-24-2007
    Location
    Melbourne, Australia
    Posts
    79
    Thanks mate, that worked a treat. Can you make this cell or range specific instead of the whole worksheet?
    Jase

  6. #6
    Forum Contributor Kieran's Avatar
    Join Date
    10-02-2003
    Location
    Perth, Western Australia
    MS-Off Ver
    Office 2003
    Posts
    109
    Replace the code with this below

    It restricts the action to A1:D10. Change the reference as appropriate.


    Please Login or Register  to view this content.
    Last edited by Kieran; 11-24-2008 at 01:51 AM. Reason: forgot to wrap the code.

  7. #7
    Registered User
    Join Date
    01-24-2007
    Location
    Melbourne, Australia
    Posts
    79
    Thanks mate, I appreciate all your help.
    Jase
    ps, how do I mark this as solved? or is that something the moderators do?

  8. #8
    Forum Contributor Kieran's Avatar
    Join Date
    10-02-2003
    Location
    Perth, Western Australia
    MS-Off Ver
    Office 2003
    Posts
    109
    I really don't know about marking it as solved.
    does the thread tools drop-down at the top of the panel show anyting to you (as the creator of the thread)

+ 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