Formula to pick out certain numbers.

Eddielion

New Member
Joined
Jun 17, 2005
Messages
42
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
Hello everyone. I need a formula to look for all the 1's and 2's (A2:J2) and list the corisponding number(A1:J1). My original spreadsheet has 37 numbers. I'm running on a Windows 10 and I think Excel 2013(office 360).
Row 1 A:J are the numbers that it's looking for.
Row 2 A:J is the number of times it found a certain number.
L2:?2 - is the list of numbers(which are in A1:J1) that met the criteria
L2:?2 Can have from 1 to to how ever many numbers it finds.

A1:J1 --- 1 2 3 4 5 6 7 8 9 10
A2:J2 --- 0 1 1 3 2 3 2 2 1 5
L2:?2 --- 2 3 5 7 8 9 (formula to find numbers )
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Using your posted example....I've got two possible solutions, an array-formula, completed by holding CTRL and SHIFT when you press ENTER, and a regular formula. Typically, I can get a regular formula to emulate an array formula with just a little more effort (but not quite in this case)
Array-formula entered in L2 and copied across
Code:
=IFERROR(SMALL(IF(ISNUMBER(MATCH($A$2:$J$2,{1;2},0)),$A$1:$J$1),COLUMNS($A:A)),"")

Regular formula:
Code:
=IFERROR(SMALL(INDEX(ISNUMBER(MATCH($A$2:$J$2,{1;2},0))*$A$1:$J$1,0),COLUMNS($A:A)+
10-SUM(COUNTIF($A$2:$J$2,{1,2}))),"")

Is that something you can work with?
 
Upvote 0
Here is another option for you. Formula in L2 (standard entry) copied across to U2.

Excel Workbook
ABCDEFGHIJKLMNOPQRSTU
112345678910
20113232215235789
List Values
 
Upvote 0
Hello Ron.
Thank you very much. Yes this will work for me, and thank you for the speedy responds.
Eddie
 
Upvote 0
Hello Peter.
Thank you for your response also. I appreciate the help. Thank you again.
Eddie
 
Upvote 0

Forum statistics

Threads
1,214,839
Messages
6,121,892
Members
449,058
Latest member
Guy Boot

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