+ Reply to Thread
Results 1 to 3 of 3

uppercase all data in the sheet.

Hybrid View

  1. #1
    Registered User
    Join Date
    08-25-2016
    Location
    uk
    MS-Off Ver
    2010
    Posts
    40

    uppercase all data in the sheet.

    Hello experts,

    I have a sheet with data already in it in uppercase and lowercase.

    I would like to convert all of it into uppercase and hereon after any new data entered should also automatically be in uppercase only.

    any help would be really appreciated.

    Thank you in advance.

    Exceltriumph

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: uppercase all data in the sheet.

    Run this to "fix" all the existing data to uppercase:
    Sub RunOnce()
        Dim c As Range
        For Each c In Sheet1.UsedRange.SpecialCells(xlCellTypeConstants)
            c.Value = UCase(c.Value)
        Next c
    End Sub
    Put this code in the worksheet module to "correct" all new entries to uppercase, as they are entered:
    Private Sub Worksheet_Change(ByVal Target As Range)
        Dim c As Range
        For Each c In Target.Cells
            If Not c.HasFormula Then c.Value = UCase(c.Value)
        Next c
    End Sub
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Registered User
    Join Date
    08-25-2016
    Location
    uk
    MS-Off Ver
    2010
    Posts
    40

    Re: uppercase all data in the sheet.

    Hi Olly,

    both codes worked perfectly.
    the second code for correcting all new entries works like magic :D

    Thank you very much.
    Last edited by exceltriumph; 09-06-2016 at 08:14 AM.

+ 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. Data Validation -- Uppercase List
    By dtrimble in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-13-2012, 12:30 PM
  2. How to convert Columnar Data Range in UPPERCASE using VBA and not formulas?
    By e4excel in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 06-06-2011, 09:10 PM
  3. format textbox data to uppercase
    By dgraham in forum Excel General
    Replies: 2
    Last Post: 11-26-2007, 10:10 PM
  4. force input data to be uppercase
    By 435 Gavea in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-16-2007, 10:13 AM
  5. Automatically change cell data to all uppercase?
    By Pyrex238 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-22-2007, 01:21 PM
  6. Replies: 4
    Last Post: 07-31-2006, 02:05 AM
  7. Parse data where break is a first uppercase character in a string?
    By Glen in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-16-2006, 02:35 PM
  8. hOW to retrive the Data after did UPPERCASE
    By shobsrangan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-01-2006, 07:10 AM

Tags for this Thread

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