Extract up to 3 numbers from a cell in Excel
11:22 10 Jul 2023

I have column starting at A2 where each row contains a name and 1 to 3 numbers in the following format: "name : number number number"

For example:

Mark : some 32 text 91 here
John32 : 5/6 more text
Michael : even 32 more 21 text 3
Kyle69 : 57 something
Philip : i 2 dont 43 know
4Chris2 : 3 21 7

What I want is:

32 91
5 6
32 21 3
57
2 43
3 21 7

The catch is, there may or not be text in-between and around(before and/or after) the numbers and the numbers can be one or two digits(1-99) The numbers can be extracted into one cell or respectfully 1 to 3 different cells. Extra points if it puts a " - " in the place of missing numbers (number 2 and/or number 3)

The version of Excel I'm using is 2016 and does not have formulas such as LET(), TOCOL(), NA(), FILTER(), and maybe some others so the more basic the solution is, the better.

Please and thank your for any help provided in advance!

Edit: In anyone interested, this is the mess I got to work but it only works if there are exactly 2 numbers after the " : " in the cell and returns "No. 1" or "No. 2" if either of the two numbers is outside 1-90. Why 90 and not 99? I just felt like it and getting numbers >90 is rare and should be checked so an error draws my attention better. :D

=IF(ISBLANK(A2);"-";IF(AND(ISNUMBER(MID(A2;MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&{0;1;2;3;4;5;6;7;8;9};FIND(":";A2;1)))+1;1)*1);ISNUMBER(MID(A2;MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&{0;1;2;3;4;5;6;7;8;9};FIND(":";A2;1)))+2;1)*1));"No. 1";IF(AND(IF(VALUE(MID(A2;MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&{0;1;2;3;4;5;6;7;8;9};FIND(":";A2;1)));IF(ISNUMBER(MID(A2;MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&{0;1;2;3;4;5;6;7;8;9};FIND(":";A2;1)))+1;1)*1);2;1)))>0; TRUE; FALSE);IF(VALUE(MID(A2;MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&{0;1;2;3;4;5;6;7;8;9};FIND(":";A2;1)));IF(ISNUMBER(MID(A2;MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&{0;1;2;3;4;5;6;7;8;9};FIND(":";A2;1)))+1;1)*1);2;1)))<=90; TRUE; FALSE));IF(AND(ISNUMBER(MID(A2;MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&{0;1;2;3;4;5;6;7;8;9};MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&{0;1;2;3;4;5;6;7;8;9};FIND(":";A2;1)))+IF(ISNUMBER(MID(A2;MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&{0;1;2;3;4;5;6;7;8;9};FIND(":";A2;1)))+1;1)*1);2;1)))+1;1)*1);ISNUMBER(MID(A2;MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&{0;1;2;3;4;5;6;7;8;9};MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&{0;1;2;3;4;5;6;7;8;9};FIND(":";A2;1)))+IF(ISNUMBER(MID(A2;MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&{0;1;2;3;4;5;6;7;8;9};FIND(":";A2;1)))+1;1)*1);2;1)))+2;1)*1));"No. 2";IF(AND(IF(VALUE(MID(A2;MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&{0;1;2;3;4;5;6;7;8;9};MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&{0;1;2;3;4;5;6;7;8;9};FIND(":";A2;1)))+IF(ISNUMBER(MID(A2;MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&{0;1;2;3;4;5;6;7;8;9};FIND(":";A2;1)))+1;1)*1);2;1)));IF(ISNUMBER(MID(A2;MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&{0;1;2;3;4;5;6;7;8;9};MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&{0;1;2;3;4;5;6;7;8;9};FIND(":";A2;1)))+IF(ISNUMBER(MID(A2;MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&{0;1;2;3;4;5;6;7;8;9};FIND(":";A2;1)))+1;1)*1);2;1)))+1;1)*1);2;1)))>0; TRUE; FALSE);IF(VALUE(MID(A2;MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&{0;1;2;3;4;5;6;7;8;9};MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&{0;1;2;3;4;5;6;7;8;9};FIND(":";A2;1)))+IF(ISNUMBER(MID(A2;MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&{0;1;2;3;4;5;6;7;8;9};FIND(":";A2;1)))+1;1)*1);2;1)));IF(ISNUMBER(MID(A2;MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&{0;1;2;3;4;5;6;7;8;9};MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&{0;1;2;3;4;5;6;7;8;9};FIND(":";A2;1)))+IF(ISNUMBER(MID(A2;MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&{0;1;2;3;4;5;6;7;8;9};FIND(":";A2;1)))+1;1)*1);2;1)))+1;1)*1);2;1)))<=90; TRUE; FALSE));MID(A2;MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&{0;1;2;3;4;5;6;7;8;9};FIND(":";A2;1)));IF(ISNUMBER(MID(A2;MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&{0;1;2;3;4;5;6;7;8;9};FIND(":";A2;1)))+1;1)*1);2;1))&" "&MID(A2;MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&{0;1;2;3;4;5;6;7;8;9};MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&{0;1;2;3;4;5;6;7;8;9};FIND(":";A2;1)))+IF(ISNUMBER(MID(A2;MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&{0;1;2;3;4;5;6;7;8;9};FIND(":";A2;1)))+1;1)*1);2;1)));IF(ISNUMBER(MID(A2;MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&{0;1;2;3;4;5;6;7;8;9};MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&{0;1;2;3;4;5;6;7;8;9};FIND(":";A2;1)))+IF(ISNUMBER(MID(A2;MIN(FIND({0;1;2;3;4;5;6;7;8;9};A2&{0;1;2;3;4;5;6;7;8;9};FIND(":";A2;1)))+1;1)*1);2;1)))+1;1)*1);2;1));"No. 2"));"No. 1")))
excel excel-formula