Hello,
would require help to have a formula which can help to identify the position of Last Upper case letter in a cell
Example:
A1: This IS A Example ( This should give 11 as "E" in example is the last Upper case letter in the cell)
Thanks.
Hello,
would require help to have a formula which can help to identify the position of Last Upper case letter in a cell
Example:
A1: This IS A Example ( This should give 11 as "E" in example is the last Upper case letter in the cell)
Thanks.
Try the following Code. You could use 'Regular Expressions' if your search criteria
were a little more complicated. See http://www.macrostash.com/2011/10/08...for-excel-vba/
Please Login or Register to view this content.
Not the most elegent of formulas but this works:
=MAX(IF(IFERROR(IF(FIND(IF(MID(A1,ROW($1:$99),1)<>" ",MID(A1,ROW($1:$99),1)),UPPER(MID(A1,ROW($1:$99),1))),ROW($1:$99)),FALSE)<=LEN(A1),ROW($1:$99)))
Excel Guru in the making
<----------If the question has been answered to your satisfication please click the Add Repuation star to the left
Here's another one.
Your formula will return an incorrect result if there are non-letter characters in the string (if that's a possibility). For example:
I don't like onions.
You Owe Us $100
This array formula accounts for non-letter chars.
=MAX(IF(ABS(CODE(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1))-77.5)<13,ROW(INDIRECT("1:"&LEN(A1)))))
** array formulas need to be entered using the key
combination of CTRL,SHIFT,ENTER (not just ENTER).
Hold down both the CTRL key and the SHIFT key
then hit ENTER.
If the referenced cell is empty then you'll get a #REF! error which can be accounted for if needed.
There may also be instances where the formula will return 0 meaning no uppercase letters are present. If you don't want a result of 0 this can also be accounted for if needed.
Biff
Microsoft MVP Excel
Keep It Simple Stupid
Let's Go Pens. We Want The Cup.
Really nice, Tony.
I particularly like the use of ABS and < as one condition in place of two (< and >). Excellent stuff.
Thanks!
NVM - did not work with repetition.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks