View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Glenn Glenn is offline
external usenet poster
 
Posts: 1,240
Default Truncate a series of numbers

Carrie_Loos via OfficeKB.com wrote:
Hi -

I am trying to truncate these numbers to only 2 sections; example: from 51230.

14.6.24 to 51230.14 There can be multiple quantities of numbers in each
section; it can be 51230.1434.66.789. I used the function below but it leaves
a "." at the end which I do not want. As in the example I need to have just
51230.14 Any suggestions?

Thanks

=LEFT(K2,FIND(CHAR(7),SUBSTITUTE(K2,".",CHAR(7),2) ))

Thanks in advance,
Carrie



Borrowing from an answer I posted earlier today...

=SUBSTITUTE(TRIM(LEFT(SUBSTITUTE(K2,".",REPT(" ",99)),198))," ",".")