How do I filter data from one sheet to another based on dates?

%3CLINGO-SUB%20id%3D%22lingo-sub-1807965%22%20slang%3D%22en-US%22%3EHow%20do%20I%20filter%20data%20from%20one%20sheet%20to%20another%20based%20on%20dates%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1807965%22%20slang%3D%22en-US%22%3E%3CDIV%20class%3D%22o9v6fnle%20cxmmr5t8%20oygrvhab%20hcukyx3x%20c1et5uql%22%3EI%20have%20a%20set%20of%20data%20which%20shows%20what%20dates%20risk%20assessments%20are%20due.%20I%20want%20to%20have%204%20sheets%3B%20Sheet%201%20for%20the%20master%20data%2C%20Sheet%202%20to%20show%20overdue%20risk%20assessments%2C%20Sheet%203%20to%20show%20which%20risk%20assessments%20are%20due%20within%201%20month%2C%20and%20Sheet%204%20to%20show%20which%20risk%20assessments%20are%20not%20due.%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22o9v6fnle%20cxmmr5t8%20oygrvhab%20hcukyx3x%20c1et5uql%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22o9v6fnle%20cxmmr5t8%20oygrvhab%20hcukyx3x%20c1et5uql%22%3EI%20know%20I%20could%20just%20have%201%20sheet%20and%20use%20the%20filter%20function%20to%20change%20what%20data%20is%20shown%2C%20but%20I'd%20rather%20have%20multiple%20sheets%20which%20all%20feed%20from%20the%20master%20sheet%2C%20so%20no%20manual%20filtering%20would%20be%20needed.%3C%2FDIV%3E%3CDIV%20class%3D%22o9v6fnle%20cxmmr5t8%20oygrvhab%20hcukyx3x%20c1et5uql%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22o9v6fnle%20cxmmr5t8%20oygrvhab%20hcukyx3x%20c1et5uql%22%3EI've%20tried%20using%20the%20Power%20Query%20function%20but%20I'm%20a%20total%20novice%20and%20I%20got%20nowhere%20with%20it.%3C%2FDIV%3E%3CDIV%20class%3D%22o9v6fnle%20cxmmr5t8%20oygrvhab%20hcukyx3x%20c1et5uql%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22o9v6fnle%20cxmmr5t8%20oygrvhab%20hcukyx3x%20c1et5uql%22%3EAny%20help%20would%20be%20wildly%20appreciated%20-%20even%20if%20it's%20only%20help%20setting%20up%20one%20of%20the%203%20filter%20sheets.%3C%2FDIV%3E%3CDIV%20class%3D%22o9v6fnle%20cxmmr5t8%20oygrvhab%20hcukyx3x%20c1et5uql%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22o9v6fnle%20cxmmr5t8%20oygrvhab%20hcukyx3x%20c1et5uql%22%3ECan%20someone%20help%20me%20please%3F%20I've%20attached%20a%20sample%20workbook%20to%20help.%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1807965%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1808118%22%20slang%3D%22en-US%22%3ERe%3A%20How%20do%20I%20filter%20data%20from%20one%20sheet%20to%20another%20based%20on%20dates%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1808118%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F842109%22%20target%3D%22_blank%22%3E%40andyyporter%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20have%20the%20newest%20version%20of%20Excel%2C%20there%20is%20a%20new%20function%2C%20FILTER%2C%20which%20does%20in%20formulaic%20form%20what%20the%20old%20menu%20selectin%20did%2C%20and%20you%20can%20do%20it%20on%20separate%20sheets%20from%20the%20dataset%2C%20as%20you're%20wanting%20to%20do.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOn%20your%20sheet3%20in%20the%20attached%2C%20I've%20created%20an%20example.%20Here's%20the%20formula%20that%20appears%20in%20cell%20A5%20of%20that%20sheet.%20Note%2C%20that's%20the%20only%20place%20where%20that%20formula%20appears.%20It%20%22spills%22%20to%20all%20the%20adjacent%20cells%20needed%2C%20in%20both%20rows%20and%20columns.%3C%2FP%3E%3CP%20class%3D%22lia-indent-padding-left-30px%22%3E%3CSTRONG%3E%3DFILTER(Table1%2CTable1%5BReview%20date%5D%3CD2%3Ewhere%20D2%20contains%20the%20formula%20%3DTODAY()%2C%20so%20as%20to%20get%20the%20list%20of%20overdue%20cases.%3C%2FD2%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EThis%20is%20one%20of%20several%20new%20%22Dynamic%20Array%22%20functions.%20Here's%20a%20video%20that%20serves%20as%20a%20great%20into%20to%20the%20set%20of%20Dynamic%20Array%20functions.%20%3CA%20href%3D%22https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D9I9DtFOVPIg%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D9I9DtFOVPIg%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1808592%22%20slang%3D%22en-US%22%3ERe%3A%20How%20do%20I%20filter%20data%20from%20one%20sheet%20to%20another%20based%20on%20dates%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1808592%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F425987%22%20target%3D%22_blank%22%3E%40mathetes%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20replying.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20I%20open%20your%20attached%20file%20the%20formula%20doesn't%20seem%20to%20have%20worked%20-%20all%20the%20cells%20are%20showing%20%22%23NAME%3F%22.%20I%20do%20have%20the%20latest%20version%20of%20excel%20so%20that%20shouldn't%20be%20an%20issue.%20Did%20that%20formula%20work%20for%20you%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20frustrating%2C%20it%20just%20seems%20like%20it's%20impossible%20to%20do!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1808671%22%20slang%3D%22en-US%22%3ERe%3A%20How%20do%20I%20filter%20data%20from%20one%20sheet%20to%20another%20based%20on%20dates%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1808671%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F842109%22%20target%3D%22_blank%22%3E%40andyyporter%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYes%2C%20it%20does%20work%20for%20me.%3C%2FP%3E%3CP%3EI%20suspect%20you%20may%20not%20have%20the%20most%20recent.%20Try%20entering%20%3DFILTER%20and%20see%20what%20happens.%20If%20you%20have%20a%20version%20that%20supports%20that%2C%20it%20will%20(as%20it%20does%20for%20other%20functions)%20start%20prompting%20you%20to%20complete%20the%20formula.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor
I have a set of data which shows what dates risk assessments are due. I want to have 4 sheets; Sheet 1 for the master data, Sheet 2 to show overdue risk assessments, Sheet 3 to show which risk assessments are due within 1 month, and Sheet 4 to show which risk assessments are not due. 
 
I know I could just have 1 sheet and use the filter function to change what data is shown, but I'd rather have multiple sheets which all feed from the master sheet, so no manual filtering would be needed.
 
I've tried using the Power Query function but I'm a total novice and I got nowhere with it.
 
Any help would be wildly appreciated - even if it's only help setting up one of the 3 filter sheets.
 
Can someone help me please? I've attached a sample workbook to help.
9 Replies

 

@andyyporter 

 

If you have the newest version of Excel, there is a new function, FILTER, which does in formulaic form what the old menu selection did, and you can do it on separate sheets from the dataset, as you're wanting to do.

 

On your sheet3 in the attached, I've created an example. Here's the formula that appears in cell A5 of that sheet. Note, that's the only place where that formula appears. It "spills" to all the adjacent cells needed, in both rows and columns.

=FILTER(Table1,Table1[Review date]<D2)    where D2 contains the formula =TODAY(), so as to get the list of overdue cases.

This is one of several new "Dynamic Array" functions. Here's a video that serves as a great intro to the set of Dynamic Array functions. https://www.youtube.com/watch?v=9I9DtFOVPIg

 

@mathetes 

 

Thank you for replying.

 

When I open your attached file the formula doesn't seem to have worked - all the cells are showing "#NAME?". I do have the latest version of excel so that shouldn't be an issue. Did that formula work for you?

 

So frustrating, it just seems like it's impossible to do!

 

 

 

 

@andyyporter 

 

Yes, it does work for me.

I suspect you may not have the most recent. Try entering =FILTER and see what happens. If you have a version that supports that, it will (as it does for other functions) start prompting you to complete the formula.

@andyyporter 

What do you mean under the latest version of Excel? Is that for Android, Mac or Windows? If Windows is that Excel 2019 or you are on subscription model, i.e. Office 365? Formula will work for the latest case.

@mathetes The only option it gives me if =FILTERXML, not =FILTER. Does that make a difference?

@Sergei Baklan It's for Windows. When I click on the "Account" button and then "About Excel", it says it's "Microsoft Excel 2019". However, just below the "About Excel" button it says "Version 2009", so that's a little confusing as to which I'm actually running.

@andyyporter 

Excel 2019 is the name of the product. Version 2009 is the build version of the product, after it in parentheses is concrete build number.

@andyyporter 

These are functions with different functionality. FILTERXML parses the XML expression. FILTER filters data range based on defined condition and returns result to another range in the sheet.

@andyyporter 

As variant, for such sample

image.png

enter into D15 formula

=IFERROR(
   INDEX(Table1[Review date],
      AGGREGATE(15,6,1/(Table1[[Review date]:[Review date]]<$D$2)*
          (ROW(Table1[Review date])-ROW(Table1[[#Headers],[Review date]])),
          ROW()-ROW($D$14))
      ),
"")

drag it to the left and to the right. Apply proper formats to A15:F15 (formula will show dates for numbers and blank cells), after drag entire line A15:F15 down till empty space will appear. Or as needed to have some gap for future data in Table1.