Capture data range where criteria is met

colinheslop1984

Board Regular
Joined
Oct 14, 2016
Messages
129
Office Version
  1. 2016
If I have a set of data as below
(ignore the dashes, it's just to separate the info as I can't seem to do a table with my phone)

A--------B--------C--------D
1------1901
1------1902
1------1903
2------1904
2------1905
2------1906
3------1907

(This list goes on all the way to 1952)

If d1 contains either 1, 2 or 3, I want cells d2:d14 to display the range from column B, in ascending order, where column A matches criteria set out in D1

Any suggestions?
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
How about


Excel 2013/2016
ABCD
11
2119011901
3119021902
4119031903
5219041910
6219051911
7219061912
8319071919
9319081920
10319091921
1111910
1211911
1311912
1421913
1521914
1621915
1731916
1831917
1931918
2011919
2111920
2211921
2321922
2421923
2521924
2631925
2731926
All
Cell Formulas
RangeFormula
D2=IFERROR(INDEX($B$2:$B$27,AGGREGATE(15,6,ROW($A$2:$A$27)-ROW($A$2)+1/($A$2:$A$27=D$1),ROWS($1:1))),"")
 
Upvote 0

Forum statistics

Threads
1,214,644
Messages
6,120,709
Members
448,983
Latest member
Joaquim_Baptista

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