View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
vezerid vezerid is offline
external usenet poster
 
Posts: 751
Default extract numbers from a alphanumeric cell

For lack of something simpler...

=MID(A1,MIN(IF(ISNUMBER(--MID(A1,ROW(1:20),
1)),ROW(1:20))),MAX(IF(ISNUMBER(--MID(A1,ROW(1:20),1)),ROW(1:20)))-
MIN(IF(ISNUMBER(--MID(A1,ROW(1:20),1)),ROW(1:20)))+1)

In the above formula we assume that the cell with the mixed number is
in A1. We also assume that there will be no more than 20 characters.
Replace A1 and 1:20 with whatever cell and whatever range.

This is an *array* formula. You must commit it with Ctrl+Shift+Enter.

HTH
Kostis Vezerides

On Feb 27, 8:23 pm, Igneshwara reddy <Igneshwara
wrote:
How to extract numbers from a alphanumeric cell.

Eg: If a cell contains fdsfa24655, my result should be 24655
If a cell contains fd123fds, my result should be 123.