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
|