View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Invalid characters in cells

Hi,

As long as the numbers are in a single block then this should work

=LOOKUP(10^23,--("0"&MID(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0 123456789")),ROW($1:$10000))))

Mike

"Francis Ang" wrote:

I am trying to extract only the valid values from a cell and remove all the
invalid values, like * / # etc. For example, in cell A1, the value is
*8930**/*. The length of the value is variable and the placement of the
invalid values are not fixed.

How do I extract only 8930?

I have tried, TRIM, LTRIM, RTRIM functions but it does not work!

Any help would be greatly appreciated.