View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default reorganize string

=MID(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"01234 56789")),SUMPRODUCT(LEN(A1)-LEN(SUBSTITUTE(A1,{0,1,2,3,4,5,6,7,8,9},""))))&LEF T(A1,FIND("=",A1)-1)

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"ViestaWu" wrote in message
...
I have a string, such as "msl=30mk/kg". I want to reorganize it to "30
(msl)". but the troubles are that the digits of number (30) is not stable,
this time 30, that time 40.89, maybe next time whatever it want to be.
Besides, the unit "mk/kg" is not stable, either.

till now, I have wrotten the following function. but the troubles listed
upon can't be solved yet. who can help me?

=MID(A1,FIND("=",A1,1)+1,2) & " (" & MID(A1,1,FIND("=",A1,1)-1) & ")"