+ Reply to Thread
Results 1 to 8 of 8

Help making column A starting on row 2 all caps

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    05-11-2020
    Location
    Kansas City
    MS-Off Ver
    Office 365
    Posts
    195

    Help making column A starting on row 2 all caps

    I am needing to make column A starting on row 2 all caps on tab "Crystal Anderson" I really need the VBA to work on multiple tabs, but can probably figure it out if I can get a functional script on one. This excel sheet will be used as a shared file on Teams, so I'm not sure if that makes a difference.

    Thank you in advance,
    Adam

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,777

    Re: Help making column A starting on row 2 all caps

    Put this code into the VBA module for the worksheet. It will update any data entered or updated to be all caps after the user hits ENTER. You weren't specific about how you wanted this to work but I thought that would be preferable to clicking a button to do the whole column at once.

    Private Sub Worksheet_Change(ByVal Target As Range)
    
       Dim Cell As Range
       
       Application.EnableEvents = False
       
       For Each Cell In Target
       
          If Cell.Column = 1 And Cell.Row >= 2 Then
             Cell.Value = UCase(Cell.Value)
          End If
       
       Next Cell
       
       Application.EnableEvents = True
    
    End Sub
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    05-11-2020
    Location
    Kansas City
    MS-Off Ver
    Office 365
    Posts
    195

    Re: Help making column A starting on row 2 all caps

    I have a dumb question, but is there a way to use Macros to accomplish this? I don't think I can open a VBA module on excel 365.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,777

    Re: Help making column A starting on row 2 all caps

    Quote Originally Posted by Newtonus_Prime View Post
    I don't think I can open a VBA module on excel 365.
    Are you using the desktop install of Microsoft 365? Press ALT+F11 to open the VBA development window.

    If you are on the web browser version, then you cannot use VBA. You can use Office Script if your version supports it.

  5. #5
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: Help making column A starting on row 2 all caps


    Macros disapear since last century but Microsoft had such not the good idea to keep the same term for a VBA procedure so Macros = VBA ‼

    So since more than 25 years any Windows Excel version has VBA modules …

  6. #6
    Forum Contributor
    Join Date
    05-11-2020
    Location
    Kansas City
    MS-Off Ver
    Office 365
    Posts
    195

    Re: Help making column A starting on row 2 all caps

    Attachment 855456

    I am getting a ton of errors. Am I doing this right?

    Thank you,
    Adam

  7. #7
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,777

    Re: Help making column A starting on row 2 all caps

    Quote Originally Posted by Newtonus_Prime View Post
    Attachment 855456

    I am getting a ton of errors. Am I doing this right?
    Hopefully sintek's post cleared it up. But your attachment did not work. Were you trying to attach an image?

    To attach an image, first click Go Advanced under your edit box. Then click in the text to set the cursor to where you want the image to appear, then press the image icon and attach your image.

  8. #8
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,957

    Re: Help making column A starting on row 2 all caps

    Place this code in ThisWorkbook Module
    Whenever you type in Column A of the Main Table's databodyrange of the listed sheets, it will capatalize entry
    Option Explicit
    Dim wsArr
    Private Sub Workbook_SheetChange(ByVal ws As Object, ByVal Target As Range)
    wsArr = Array("Crystal Anderson", "Micah Sloan", "Kari Ohler") '! Here you can list the sheets that need to be included...
    Set ws = ActiveSheet
    If Target.CountLarge > 1 Then Exit Sub
    If Not IsError(Application.Match(ws.Name, wsArr, 0)) Then
         If Not Intersect(Target, ws.ListObjects(2).ListColumns(1).DataBodyRange) Is Nothing Then
            Application.EnableEvents = False
            Target = UCase(Target)
            Application.EnableEvents = True
        End If
    End If
    End Sub
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Trim Special Chars & Small Caps and Return the Big Caps and Space only
    By Dahlia in forum Excel Formulas & Functions
    Replies: 25
    Last Post: 07-30-2017, 11:23 AM
  2. Replies: 1
    Last Post: 04-13-2012, 10:03 PM
  3. Making caps lowercase?
    By james_tang in forum Excel General
    Replies: 4
    Last Post: 07-03-2007, 12:40 PM
  4. How can I convert all Caps to first letter caps in Excel?
    By Fenljp26 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  5. How can I convert all Caps to first letter caps in Excel?
    By in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-06-2005, 06:05 AM
  6. How can I convert all Caps to first letter caps in Excel?
    By in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 09-06-2005, 04:05 AM
  7. making sure the user enters in CAPS
    By funkymonkUK in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-04-2005, 05:12 AM

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