+ Reply to Thread
Results 1 to 7 of 7

see if string is in call caps

  1. #1
    Valued Forum Contributor luv2glyd's Avatar
    Join Date
    07-13-2008
    Location
    Seattle, WA, US
    MS-Off Ver
    Excel 2010
    Posts
    679

    see if string is in call caps

    I have the following to see if a string variable is in call caps:

    Please Login or Register  to view this content.
    is there a faster way vs. "If UCase(var1) = var1"?
    You either quit or become really good at it. There are no other choices.

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: see if string is in call caps

    Here is a formula solution
    In B1
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v A B
    1 APPLE Entire word is in CAPS
    2 Apple Entire word is in not in caps
    3 APPLe Entire word is in not in caps
    4 TABLE Entire word is in CAPS
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,666

    Re: see if string is in call caps

    Not much but bit faster.
    Please Login or Register  to view this content.
    See also StrComp function with BinaryCompare.

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: see if string is in call caps

    How do you want to handle non-alphabetic characters

    i.e. is "ABC123XYX" considered "all caps"?
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  5. #5
    Valued Forum Contributor luv2glyd's Avatar
    Join Date
    07-13-2008
    Location
    Seattle, WA, US
    MS-Off Ver
    Excel 2010
    Posts
    679

    Re: see if string is in call caps

    Quote Originally Posted by jindon View Post
    Not much but bit faster.
    Please Login or Register  to view this content.
    See also StrComp function with BinaryCompare.
    What does $ do in UCase$?

  6. #6
    Valued Forum Contributor luv2glyd's Avatar
    Join Date
    07-13-2008
    Location
    Seattle, WA, US
    MS-Off Ver
    Excel 2010
    Posts
    679

    Re: see if string is in call caps

    Quote Originally Posted by mikerickson View Post
    How do you want to handle non-alphabetic characters

    i.e. is "ABC123XYX" considered "all caps"?
    Did not realize that. Is it possible to exclude 1234... etc.

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,666

    Re: see if string is in call caps

    While you are in VBE;
    go to [View] - [Object Browser]
    enter ucase in search box

    You will see many string functions and find few functions with $ at the end.
    These functions returns explicitly String type data and bit faster.

+ 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. Finding Caps in a String
    By litrainer in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-10-2013, 11:25 AM
  2. (SOLVED) Change ALL CAPS words from in string into Title Case
    By agf12555 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-21-2011, 09:02 PM
  3. [SOLVED] 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, 12:05 PM
  4. [SOLVED] 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. [SOLVED] 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, 03:05 AM
  6. 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, 12:05 AM
  7. [SOLVED] How can I convert all Caps to first letter caps in Excel?
    By Fenljp26 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM
  8. [SOLVED] excel sheet all caps and needs to be only the first letter caps..
    By kroberts in forum Excel General
    Replies: 1
    Last Post: 03-07-2005, 11:06 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