Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Ucase / macros | Excel Discussion (Misc queries) | |||
Get…UCase or LCase ??? | Excel Programming | |||
Get…UCase or LCase ??? | Excel Programming | |||
UCase in textbox, help | Excel Programming | |||
UCase Help | Excel Programming |