View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld[_2_] Ron Rosenfeld[_2_] is offline
external usenet poster
 
Posts: 1,045
Default Removing 2-3 characters at the end

On Wed, 8 Jun 2011 14:33:54 -0700 (PDT), Ty wrote:

On Jun 8, 4:28*pm, "Rick Rothstein"
wrote:
Give this formula a try...

=LOOKUP(9E+99,--LEFT(SUBSTITUTE(MID(A1,MIN(FIND({0,1,2,3,4,5,6,7,8 ,9},A1&"0*123456789")),LEN(A1)),".",""),ROW(INDIRE CT("1:99"))))

Rick Rothstein (MVP - Excel)


Thank you! It works.


One of your examples:

-----------------------------
7.2.9.3.a.b
need to have 729
---------------------------

Rick's formula returns all the digits, so it would return 7293.

Is your example incorrect with a typo? Or do you really want only the first three digits?