Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
search for capital letter at end of text string
I need to search for a word with a capital letter at the end of the string.
For example Hydrochloric acid 1M Ive tried using =IF(RIGHT(D18)="M","yes","no"), but it doesnt differentiate between lower case and upper case. Can anyone help? Thanks, Roger |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
search for capital letter at end of text string
Try it this way in order to check for a specific upper cased letter...
=IF(EXACT(RIGHT(D18),"M"),"yes","no") and this way to see if the letter, no matter which one it is, is upper case... =IF(AND(CODE(RIGHT(D18))=65,CODE(RIGHT(D18))<=91) ,"yes","no") Rick "Roger on Excel" wrote in message ... I need to search for a word with a capital letter at the end of the string. For example Hydrochloric acid 1M Ive tried using =IF(RIGHT(D18)="M","yes","no"), but it doesnt differentiate between lower case and upper case. Can anyone help? Thanks, Roger |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
search for capital letter at end of text string
If the last character is always a letter:
=IF(EXACT(UPPER(RIGHT(D18,1)),RIGHT(D18,1)),"Upper ","NotUpper") But this will return Upper for numbers, punctionation, special characters, ... =IF(AND(CODE(RIGHT(D18,1))=CODE("A"),CODE(RIGHT(D 18,1))<=CODE("Z")), "upper","not upper") Checks for A to Z. Roger on Excel wrote: I need to search for a word with a capital letter at the end of the string. For example Hydrochloric acid 1M Ive tried using =IF(RIGHT(D18)="M","yes","no"), but it doesnt differentiate between lower case and upper case. Can anyone help? Thanks, Roger -- Dave Peterson |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
search for capital letter at end of text string
Check your other post.
Roger on Excel wrote: I need to search for a word with a capital letter at the end of the string. For example Hydrochloric acid 1M Ive tried using =IF(RIGHT(D18)="M","yes","no"), but it doesnt differentiate between lower case and upper case. Can anyone help? Thanks, Roger -- Dave Peterson |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
search for capital letter at end of text string
Thanks - that is exactly what i was looking for
regards, Roger "Rick Rothstein (MVP - VB)" wrote: Try it this way in order to check for a specific upper cased letter... =IF(EXACT(RIGHT(D18),"M"),"yes","no") and this way to see if the letter, no matter which one it is, is upper case... =IF(AND(CODE(RIGHT(D18))=65,CODE(RIGHT(D18))<=91) ,"yes","no") Rick "Roger on Excel" wrote in message ... I need to search for a word with a capital letter at the end of the string. For example Hydrochloric acid 1M Ive tried using =IF(RIGHT(D18)="M","yes","no"), but it doesnt differentiate between lower case and upper case. Can anyone help? Thanks, Roger |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
search for capital letter at end of text string
Thanks for the help,
Best regards, Roger "Dave Peterson" wrote: If the last character is always a letter: =IF(EXACT(UPPER(RIGHT(D18,1)),RIGHT(D18,1)),"Upper ","NotUpper") But this will return Upper for numbers, punctionation, special characters, ... =IF(AND(CODE(RIGHT(D18,1))=CODE("A"),CODE(RIGHT(D 18,1))<=CODE("Z")), "upper","not upper") Checks for A to Z. Roger on Excel wrote: I need to search for a word with a capital letter at the end of the string. For example Hydrochloric acid 1M Ive tried using =IF(RIGHT(D18)="M","yes","no"), but it doesnt differentiate between lower case and upper case. Can anyone help? Thanks, Roger -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
search for words with capital letter at end | Excel Discussion (Misc queries) | |||
I did not obtain to transform text of small letter for capital le | Excel Discussion (Misc queries) | |||
New Validation option to format 1st letter as Capital letter | Excel Discussion (Misc queries) | |||
search a string and strip out ONLY the capital letters | Excel Programming | |||
how do I convert text in excel to 1st letter capital,only | Excel Worksheet Functions |