What function do I use to pull data prior to a certain date?

Closed
NSamm - Nov 17, 2016 at 11:07 AM
fdibbins Posts 33 Registration date Sunday June 19, 2016 Status Contributor Last seen November 20, 2016 - Nov 20, 2016 at 07:32 PM
Hello,

I have a database that is organized quarterly. I would like to save myself from having to manually move data onto a new sheet after 3 months have passed. I tried using an IF function, but couldn't quite get it to work. What would others suggest?

(Current quarter in 1 sheet, ALL previous quarters on a seperate sheet, ideally to transfer automatically once the 3 months has ended.)

Thank you!


Related:

2 responses

Mazzaropi Posts 1985 Registration date Monday August 16, 2010 Status Contributor Last seen May 24, 2023 147
Nov 17, 2016 at 11:14 AM
NSamm, Good afternoon.

In your case, a simple formula or function won't work.

You need a VBA EXCEL programming to do your task.
0
fdibbins Posts 33 Registration date Sunday June 19, 2016 Status Contributor Last seen November 20, 2016 1
Nov 20, 2016 at 07:32 PM
This can be done with an index/small ARRAY function, but depending on the volume of data you are dealing with, it may slow your file down. Something like...

=iferror(index(A:A,small(if($A$1:$A$500<=your-selected-date,row($A$1:$A$500)),rows($A$1:A1))),"")

entered using CTRL SHIFT ENTER, not just enter, then copy down and across as needed

This is based on column A containing your dates - adjust as needed
0