UCase?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, Its a simple question. I have a large file and i would like to check if
any of the cells are upper case. I thought i could do something simple like
if strtext = ucase(strtext) then....

but then its not able to identify ucase cells that way. Is there any
alternative way to achieve this??? Many THANKS
 
Hi ......,
You could use Conditional Formatting or a Filter to identify the
cells that are uppercase. But is there something that you want
to do with them when you find them.
http://www.mvps.org/dmcritchie/excel/condfmt.htm

Worksheet formulas are normall not case sensitive, but EXACT
requires an EXACT comparison.
=AND(ISTEXT(A1),EXACT(A1,UPPER(A1)))

http://www.mvps.org/dmcritchie/excel/strings.htm

VBA is case sensitive so your formula is correct, probably
in something else you did, numbers will be the same as is
compared to upper case, and I expect you want to try to ignore
such cells at least those that are numeric. Use of SpecialCells.
 
would something like this work?

If cell.Value > "" And cell.Value = UCase(cell.Value) Then

--


Gary
 
Hi Gary,

Yes but you can use SpecialCells to eliminate cells that are not text
as on my proper.htm page.

For Each Cell In Intersect(Rng, Rng.SpecialCells(xlConstants, xlTextValues))
If TRIM(cell.value)<> "" And cell.value = LCase(cell.value) Then .
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top