find data based on a given date and return values to a table

bhalbach

Board Regular
Joined
Mar 15, 2018
Messages
221
Office Version
  1. 2016
Platform
  1. Windows
I have a set of data on sheet1 that I would like to look through the dates in column S and return ONLY the values to sheet2 that are >= the date I specify on sheet2 A1. There will be multiple results.

Any help would be appreciated.
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Hi Balhalbach,

Like this?

BHalbach.xlsx
ST
1Dates
21/1/2020
33/3/2020
44/4/2020
55/5/2020
66/6/2020
77/7/2020
8
Sheet1


BHalbach.xlsx
AB
14/4/20204/4/20
25/5/20
36/6/20
47/7/20
5 
6 
Sheet2
Cell Formulas
RangeFormula
B1:B6B1=IFERROR(INDEX(Sheet1!$S$2:$S$9999,AGGREGATE(15,6,ROW(Sheet1!$S$2:$S$9999)-ROW(Sheet1!$S$1)/(Sheet1!$S$2:$S$9999>=$A$1),ROW())),"")
 
Upvote 0
I suggest that you update your Account details (click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

For example, if you have Excel 365 and want multiple columns returned you can do so with one single simple formula entered in one cell.

bhalbach.xlsm
ABCDEFGHIJKLMNOPQRSTU
1Hdr1Hdr2Hdr3Hdr4Hdr5Hdr6Hdr7Hdr8Hdr9Hdr10Hdr11Hdr12Hdr13Hdr14Hdr15Hdr16Hdr17Hdr18DatesHdr20Hdr21
2905738777722194376726801326338249191/01/202057
3308038438929933521288959341488610543/03/20208972
4757453659189955997914711584164473694/04/20202911
5293716973736984491791527631669993985/05/20206453
693723982965242595154341543655124226/06/20209574
7344654353145886548224142623113890327/07/20201218
Sheet1



bhalbach.xlsm
ABCDEFGHIJKLMNOPQRSTU
14/04/2020
2Hdr1Hdr2Hdr3Hdr4Hdr5Hdr6Hdr7Hdr8Hdr9Hdr10Hdr11Hdr12Hdr13Hdr14Hdr15Hdr16Hdr17Hdr18DatesHdr20Hdr21
3757453659189955997914711584164473694/04/20202911
4293716973736984491791527631669993985/05/20206453
593723982965242595154341543655124226/06/20209574
6344654353145886548224142623113890327/07/20201218
Sheet2
Cell Formulas
RangeFormula
A2:U6A2=FILTER(Sheet1!A1:U7,Sheet1!S1:S7>=A1,"")
Dynamic array formulas.
 
Upvote 0
Peter,

If I copy and paste the formula into my spreadsheet you provided it says "That function isn't valid"

If I wanted to return only specific column data and not all the column data, would a variation of the same formula work? Say I wanted to return data in columns N, O, P, Q, R & T only if the date in column S is >= sheet2A1

I suggest that you update your Account details (click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

For example, if you have Excel 365 and want multiple columns returned you can do so with one single simple formula entered in one cell.

bhalbach.xlsm
ABCDEFGHIJKLMNOPQRSTU
1Hdr1Hdr2Hdr3Hdr4Hdr5Hdr6Hdr7Hdr8Hdr9Hdr10Hdr11Hdr12Hdr13Hdr14Hdr15Hdr16Hdr17Hdr18DatesHdr20Hdr21
2905738777722194376726801326338249191/01/202057
3308038438929933521288959341488610543/03/20208972
4757453659189955997914711584164473694/04/20202911
5293716973736984491791527631669993985/05/20206453
693723982965242595154341543655124226/06/20209574
7344654353145886548224142623113890327/07/20201218
Sheet1



bhalbach.xlsm
ABCDEFGHIJKLMNOPQRSTU
14/04/2020
2Hdr1Hdr2Hdr3Hdr4Hdr5Hdr6Hdr7Hdr8Hdr9Hdr10Hdr11Hdr12Hdr13Hdr14Hdr15Hdr16Hdr17Hdr18DatesHdr20Hdr21
3757453659189955997914711584164473694/04/20202911
4293716973736984491791527631669993985/05/20206453
593723982965242595154341543655124226/06/20209574
6344654353145886548224142623113890327/07/20201218
Sheet2
Cell Formulas
RangeFormula
A2:U6A2=FILTER(Sheet1!A1:U7,Sheet1!S1:S7>=A1,"")
Dynamic array formulas.
 
Upvote 0
What part of the formula would I change to return values in other columns? Say I want to return values in columns N, O, P, Q, R & T?

Hi Balhalbach,

Like this?

BHalbach.xlsx
ST
1Dates
21/1/2020
33/3/2020
44/4/2020
55/5/2020
66/6/2020
77/7/2020
8
Sheet1


BHalbach.xlsx
AB
14/4/20204/4/20
25/5/20
36/6/20
47/7/20
5 
6 
Sheet2
Cell Formulas
RangeFormula
B1:B6B1=IFERROR(INDEX(Sheet1!$S$2:$S$9999,AGGREGATE(15,6,ROW(Sheet1!$S$2:$S$9999)-ROW(Sheet1!$S$1)/(Sheet1!$S$2:$S$9999>=$A$1),ROW())),"")
 
Upvote 0
Peter,

If I copy and paste the formula into my spreadsheet you provided it says "That function isn't valid"
Then I presume that your do not have Excel 365?
.. if you have Excel 365 and want multiple columns returned ..


It would help if we knew what version(s) you have so we could provide appropriate suggestions which is why I said ..
I suggest that you update your Account details (click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
I figured out how to change the formula, but the formula makes no sense to me lol. If I insert lines on sheet2 where the data is getting filtered the formula doesn't work properly, when I insert line I start to lose data one line for every line a insert.

The other question I had was can the results be put in a Table that expands and shrinks to accommodate the results?
 
Upvote 0
Upvote 0
What part of the formula would I change to return values in other columns? Say I want to return values in columns N, O, P, Q, R & T?

So if the data was like this

BHalbach.xlsx
NOPQRST
1This is NThis is OThis is PThis is QThis is RDatesThis is T
2N522O186P199Q410R8961/1/2020T124
3N312O996P648Q448R4643/3/2020T290
4N409O537P156Q327R5044/4/2020T981
5N663O770P815Q725R8865/5/2020T707
6N831O341P193Q132R1756/6/2020T666
7N239O929P161Q633R1147/7/2020T470
8N869O535P882Q558R2278/8/2020T617
Sheet1


Then you could retrieve using this:

BHalbach.xlsx
ABCDEFGH
14/4/2020This is NThis is OThis is PThis is QThis is RDatesThis is T
2N409O537P156Q327R5044/4/20T981
3N663O770P815Q725R8865/5/20T707
4N831O341P193Q132R1756/6/20T666
5N239O929P161Q633R1147/7/20T470
6N869O535P882Q558R2278/8/20T617
Sheet2
Cell Formulas
RangeFormula
B2:H6B2=IFERROR(INDEX(Sheet1!N$2:N$9999,AGGREGATE(15,6,ROW(Sheet1!$S$2:$S$9999)-ROW(Sheet1!$S$1)/(Sheet1!$S$2:$S$9999>=$A$1),ROW()-ROW($G$1))),"")
 
Upvote 0
Office 2016.

I was playing with Toadstool's formula

Which formula and what did you change it to?



The other question I had was what Excel version are you using?



Yes, once the above issues are resolved.
 
Upvote 0

Forum statistics

Threads
1,215,220
Messages
6,123,693
Members
449,117
Latest member
Aaagu

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