How do I extract numbers from a data list that also contains text - using a formula

chtown

New Member
Joined
Oct 4, 2007
Messages
17
This is the formula i'm using (see below). It works fine when I have just numbers in the data. When text is added it goes haywire. I've tried a couple different things but can't get it to work. I'm not sure how to write this so it only extracts numbers; and not text. I'm guessing there needs to be something in the criteria that tells it to exclude text. The example below shows how I would like the results to look. Thanks in advance.

{=IFERROR(INDEX($E$5:$E$14,MATCH(0,COUNTIF($E$4:E4,$E$5:$E$14),0)),"")}



Excel 2010
EF
4DataResults
544
6Late2
727
8On Time1
9711
10Late14
111
1211
1314
14On Time
Sheet1
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Treat them all as strings. In VBA, CStr(cellref.value) would return the string representing the data. Not sure about formulas.
 
Upvote 0
not sure how to index it into one column like your example

but if no one else helps this will put in B1 only the numbers from A1 and not the text but it puts it in same row as the number returning blanks for text

Code:
=IF(ISNUMBER(A2),A2,"")
 
Upvote 0
This works

=IFERROR(INDEX($E$1:$E$11,SMALL((IF(ISNUMBER($E$1:$E$11)=TRUE,ROW(INDIRECT("1:"&ROWS($E$1:$E$11))))),ROW(E1)),1),"")
Array formula, use Ctrl-Shift-Enter
 
Upvote 0
DataResults
44
Late2
27
On Time1
711
Late14
1DataISTEXTconvertorder
114FALSE11
14LateTRUE00
On Time2FALSE12
On TimeTRUE00
7FALSE13
LateTRUE00
1FALSE14
11FALSE15
14FALSE16
On TimeTRUE00
the helper table gives an order to the numbers
Results
14
22
37
41
511
614
7#N/A
8#N/A
9#N/A
10#N/A
offset match to get the required numbers

<colgroup><col width="64" span="13" style="width:48pt"> </colgroup><tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,215,133
Messages
6,123,232
Members
449,092
Latest member
SCleaveland

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top