+ Reply to Thread
Results 1 to 5 of 5

Extract UPPER CASE words.

Hybrid View

  1. #1
    Forum Contributor excelkeechak's Avatar
    Join Date
    07-21-2008
    Location
    India.
    MS-Off Ver
    2013 /2016
    Posts
    363

    Extract UPPER CASE words.

    i had a scenario in which i need to extract only the UPPER case words from a column and paste them in the adjacent column. Is there any formula or vba routine for it.

    Ex:
    COL A contains the following:
    FIRST
    second
    THIRD
    FOURTH
    fifth
    sixth
    SEVENTH

    ......and so on.

    i need to extract only the Letters or words which are in total Uppercase and paste them in the next column ..i.e. COLUMN B..

    any forumlas...
    Last edited by excelkeechak; 07-29-2009 at 09:27 PM.
    THANKS
    ExcelKeechak

  2. #2
    Forum Contributor
    Join Date
    04-01-2009
    Location
    Irvine, CA
    MS-Off Ver
    Excel 2010
    Posts
    280

    Re: Extract UPPER CASE words.

    You can use the EXACT and UPPER functions...

    =IF(EXACT(A1,UPPER(A1)), A1,"")

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Extract UPPER CASE words.

    Based on your example:
    Sub UpperONLY()
    Dim LR As Long, cell As Range, RNG As Range
    LR = Range("A" & Rows.Count).End(xlUp).Row
    Set RNG = Range("A1:A" & LR)
        
        For Each cell In RNG
            If cell = UCase(cell) Then cell.Copy Range("B" & Rows.Count).End(xlUp).Offset(1, 0)
        Next cell
    
    Set RNG = Nothing
    End Sub
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Extract UPPER CASE words.

    Try using an Advanced Filter...

    Using your posted data in A2:A8
    A1: MyList
    
    B1: MyList
    
    G1: IsUCase.....(or blank or any text that is not a column heading)
    G2: =EXACT(A2,UPPER(A2))
    Notice that we are referencing the first data row...not the heading

    From the Excel Main Menu:
    Data.Filter.Advanced Filter
    List_range: (select A1:A8)
    Criteria range: G1:G2
    Check: Copy to another location
    Copy to: (select B1)
    Click: OK
    The Advanced Filter will list all records that test TRUE for all upper case under cell B1.

    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  5. #5
    Forum Contributor excelkeechak's Avatar
    Join Date
    07-21-2008
    Location
    India.
    MS-Off Ver
    2013 /2016
    Posts
    363

    Re: Extract UPPER CASE words.

    i was very near to the solution.i used exact & upper functions also.but i think i messed up in using the right function at the right place.any ways,thanks for the solutions ...

+ 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