View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ty Ty is offline
external usenet poster
 
Posts: 72
Default Removing 2-3 characters at the end

On Jun 8, 7:32*pm, Ron Rosenfeld wrote:
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(INDIR ECT("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?


Yes. I only need the first 3. My way is complicated and is using a
bunch of MID's and several columns and CONCATENATION's.