ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to find the position of last ":" (https://www.excelbanter.com/excel-programming/295687-re-how-find-position-last.html)

Ken Wright

How to find the position of last ":"
 
One way using a formula, assuming string is in A1:-

=FIND("¬",SUBSTITUTE(A1,":","¬",LEN(A1)-LEN(SUBSTITUTE(A1,":",""))))

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------



"luvgreen" wrote in message
...
Hello everyone, I need to search for teh last ":" in one string. For example

"2:5,7:12, 13:13, 19:19", I need the positon of ":" before 19. How should I do
it? Thanks.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.659 / Virus Database: 423 - Release Date: 15/04/2004



Ken Wright

How to find the position of last ":"
 
You're welcome :-)

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------



"luvgreen" wrote in message
...
Thank you so much Ken. It worked perfrectly.



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.659 / Virus Database: 423 - Release Date: 15/04/2004




All times are GMT +1. The time now is 03:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com