#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default UCase?

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 903
Default UCase?

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.

---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"vbastarter" wrote in message ...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default UCase?

would something like this work?

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

--


Gary


"David McRitchie" wrote in message
...
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.

---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"vbastarter" wrote in message
...
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





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 903
Default UCase?

I did forget the reference to another page that might also help,
and includes information on SpecialCells, and macros to
convert to Proper case, Lower case and Upper case.
..
Proper, and other Text changes -- Use of SpecialCells
http://www.mvps.org/dmcritchie/excel/proper.htm


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 903
Default UCase?

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 .
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Gary Keramidas" <GKeramidasATmsn.com wrote in message ...
would something like this work?

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

--


Gary


"David McRitchie" wrote in message
...
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.

---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"vbastarter" wrote in message
...
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







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ucase / macros MrDave Excel Discussion (Misc queries) 1 July 26th 09 11:07 AM
Get…UCase or LCase ??? Totmos Excel Programming 0 January 8th 04 07:09 PM
Get…UCase or LCase ??? Totmos Excel Programming 2 January 8th 04 06:15 PM
UCase in textbox, help CAA[_4_] Excel Programming 10 December 18th 03 04:02 PM
UCase Help holder2k[_2_] Excel Programming 2 November 22nd 03 03:35 PM


All times are GMT +1. The time now is 05:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"