Solved

How do I check for any lower case letters in a col in excel ?

Posted on 2013-01-09
3
491 Views
Last Modified: 2013-01-09
I have much data to check

I need to know if  col (A) is in all caps.
I need to know if co (B) is in all lower case.

If I make a mistake my boss says he will apply "capital punishment"

thx


Excel 07
0
Comment
Question by:TIMFOX123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 70

Expert Comment

by:KCTS
ID: 38761124
I came across this code on Mr Excel, which would do what you want with any selected range

Public Sub Format_Upcase()
 Application.ScreenUpdating = False 'speed up with large selections
 Application.Calculation = xlManual

 For Each xCell In Selection
 If UCase(xCell.Text) <> xCell.Text Then xCell.Value = UCase(xCell.Text)
 Next

 Application.Calculation = xlAutomatic
 Application.ScreenUpdating = True
 End Sub

 Just highlight the cells that must be in upper case and and run the macro
If you want to put things into lower case then use this macro instead

Public Sub Format_Locase()
 Application.ScreenUpdating = False 'speed up with large selections
 Application.Calculation = xlManual

 For Each xCell In Selection
 If LCase(xCell.Text) <> xCell.Text Then xCell.Value = LCase(xCell.Text)
 Next

 Application.Calculation = xlAutomatic
 Application.ScreenUpdating = True
 End Sub
0
 
LVL 92

Accepted Solution

by:
Patrick Matthews earned 500 total points
ID: 38761142
The following formula returns TRUE if A2 contains all upper case:

=NOT(ISERROR(FIND(UPPER(A2),A2)))

For all lower case:

=NOT(ISERROR(FIND(LOWER(A2),A2)))
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 38761221
Formulawise you could use EXACT function, i.e. UPPER CASE in A2

=EXACT(A2,UPPER(A2))

and for B2 in lower case

=EXACT(B2,LOWER(B2))

regards, barry
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
count number 10 30
Error 1004 Excel 2013 11 18
Could not use "; file already in use EXCEL 2016 VBA 3 10
Search functions & INDEX Match 11 23
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question