Returning one single numer.

serge

Well-known Member
Joined
Oct 8, 2008
Messages
1,444
Office Version
  1. 2007
Platform
  1. Windows
Hello everyone,
I have those 9 numbers in that example in row 7 and I have 4 separate position columns A:D and 3 separate row 3:5.
If I type digit 2 in A:3 which is the 1st position I need a formula starting in F:3 and dragging right to return all numbers that start with a 2.

Same thing if I would type a different digit in the 3rd position it would return all the numbers that have that digit in their 3rd position.

Then in row 4, I have a 0 as a 3rd position so it would return all numbers that have 2 in 1st position and 0 in 3rd position with here reduce to 3 numbers.

Then the final digit here the 2 in the 4th position will return a single number.
I hope it's clear enough to understand ?
Thank you.

Capture.PNG
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Are the 9 numbers all in cell A7? If so, how many spaces are between each of them?
 
Upvote 0
Are the 9 numbers all in cell A7? If so, how many spaces are between each of them?
Thank you Rick for answering my post,
No, that was to show you the numbers, you can put it anyway you want in your formula I will follow you or it can be like the example with 1 space in between.
 
Upvote 0
One more question... are you still using XL2007 like your profile says? Or have you upgraded since you joined this forum 16 years ago?
 
Upvote 0
Hi Rick,

After all, I can use the row 7 with 1 space in between each number, Thank you so much.
 
Upvote 0
Hi, can someone help me with this formula,Please.
Thank you.
 
Upvote 0
Maybe something like this:

Book1
ABCDEFGHIJKL
1Pos 1Pos 2Pos 3Pos 4
2
3221032121220222112301#NUM!
420210322022301#NUM!#NUM!#NUM!
52022202#NUM!#NUM!#NUM!#NUM!#NUM!
6
7210321212202221123013102311132014101
Sheet3
Cell Formulas
RangeFormula
F3:K5F3=SMALL(IF((MID($A$7:$I$7,IF($A3="",9,1),1)=$A3&"")*(MID($A$7:$I$7,IF($B3="",9,2),1)=$B3&"")*(MID($A$7:$I$7,IF($C3="",9,3),1)=$C3&"")*(MID($A$7:$I$7,IF($D3="",9,4),1)=$D3&""),$A$7:$I$7,""),COLUMNS($F:F))
Press CTRL+SHIFT+ENTER to enter array formulas.



I can get rid of the #NUM! errors, but it would more than double the size of the formula. I'd suggest using Conditional Formatting to just change the font color to the background color. I can't really advise you how to do that though, I believe the CF functionality was significantly different in 2007 than it is in newer versions of Excel. Newer functions would also make that formula simpler too.
 
Upvote 0
An updated version:

Book1
ABCDEFGHIJK
1Pos 1Pos 2Pos 3Pos 4
2
3221032121220222112301 
420210322022301   
52022202     
6
7210321212202221123013102311132014101
Sheet3
Cell Formulas
RangeFormula
F3:K5F3=IF(ISERROR(SMALL(IF(MMULT((MID(TRANSPOSE($A$7:$I$7),IF($A3:$D3="",9,{1,2,3,4}),1)=$A3:$D3&"")+0,{1;1;1;1})=4,TRANSPOSE($A$7:$I$7),""),COLUMNS($F:F))),"",SMALL(IF(MMULT((MID(TRANSPOSE($A$7:$I$7),IF($A3:$D3="",9,{1,2,3,4}),1)=$A3:$D3&"")+0,{1;1;1;1})=4,TRANSPOSE($A$7:$I$7),""),COLUMNS($F:F)))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Thank you very much Eric your formula works well.

I wanted to ask if for example I do not input no digits in A3:D5, can the return table be blank also ?
Meaning that the return table populate as I add digits !
If not possible it's fine I can work with it, Thank you, I really appreciate your help.

3333.PNG
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,205
Members
452,618
Latest member
Tam84

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