Find position of last alphabetic letter in a cell

anglais428

Well-known Member
Joined
Nov 23, 2009
Messages
634
Office Version
  1. 2016
Platform
  1. Windows
I am looking for a formula that will identify the position of the last letter in a cell, ignoring punctuation and special characters.
E.g. If the text in a cell is:
This,text,in,a,cell,,,,,,
The result should be 19 as the last "L" is in position 19. It should ignore all the commas at the end.
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
how about
+Fluff.xlsm
AB
1
2abc123xyz,,,??9
3789xyz123abc,,*?@,12
Main
Cell Formulas
RangeFormula
B2:B3B2=AGGREGATE(14,6,SEARCH(CHAR(ROW($65:$90)),A2),1)
 
Upvote 0
Thanks for your reply. It works only if there are no repeated characters (and I have repeated characters). So, for example, if you change your cell A2 value to "abc123abc,,,??" the result is 3, whereas I would still like it to be 9.
Any ideas?
 
Upvote 0
In that case, I'm afraid I don't know.
 
Upvote 0
is that what you want?
RawTextPosition
abc123xyz,,,??z9
789xyz123abc,,*?@,c12
abc,,,abc…abcc13
 
Upvote 0
In your third example, I would expect the position number to be 15 (the last C in the cell), rows 1 and 2 are perfect.
 
Upvote 0
:biggrin: three dots together are treated as special "single character" (sometimes)
I can do nothing with that, sorry
but you can try replace . (dot) with any other special character, eg.#
Source
Raw
abc123xyz,,,??
789xyz123abc,,*?@,
abc,,,abc...abc
l;kjri2678%^&*(!!M@:Kk|)*&}{

RawTextPosition
abc123xyz,,,??z9
789xyz123abc,,*?@,c12
abc,,,abc###abcc15
l;kjri2678%^&*(!!M@:Kk|)*&}{k22
 
Last edited:
Upvote 0
Doing a search of the forum I found the following

 
Upvote 0
continue from post#7
so end result is:
Source
RawTextPosition
abc123xyz,,,??z9
789xyz123abc,,*?@,c12
abc,,,abc...abcc15
l;kjri2678%^&*(!!M@:Kk|)*&}{k22
 
Last edited:
Upvote 0
Thanks Jim, I can get something from that thread. Sandy, what formula are you using?
 
Upvote 0

Forum statistics

Threads
1,215,143
Messages
6,123,287
Members
449,094
Latest member
GoToLeep

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top