Advanced Filter and Date Forumla Syntax

BSchwan2

Board Regular
Joined
Jun 29, 2010
Messages
89
Hello all,

I recently have been teaching myself how to use the advanced filter function.

I am trying to filter based upon the current date, but I have run into an issue, which I believe must be syntax. Here is my criteria range:

<TABLE style="WIDTH: 603pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=805 border=0 x:str><COLGROUP><COL style="WIDTH: 260pt; mso-width-source: userset; mso-width-alt: 12690" span=2 width=347><COL style="WIDTH: 83pt; mso-width-source: userset; mso-width-alt: 4059" width=111><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD class=xl27 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; WIDTH: 260pt; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" width=347 height=17>TS-SO-ISSUED</TD><TD class=xl28 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 1pt solid; BORDER-LEFT: windowtext; WIDTH: 260pt; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" width=347>TS-SO-ISSUED</TD><TD class=xl29 style="BORDER-RIGHT: windowtext 1pt solid; BORDER-TOP: windowtext 1pt solid; BORDER-LEFT: windowtext; WIDTH: 83pt; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" width=111>Closed</TD></TR><TR style="HEIGHT: 13.5pt" height=18><TD class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 1pt solid; BORDER-BOTTOM: windowtext 1pt solid; HEIGHT: 13.5pt; BACKGROUND-COLOR: transparent" height=18> >= & DateSerial(Year(Date), Month(Date) - 6, Day(Date))</TD><TD class=xl25 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 1pt solid; BACKGROUND-COLOR: transparent"><= & Date</TD><TD class=xl26 style="BORDER-RIGHT: windowtext 1pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 1pt solid; BACKGROUND-COLOR: transparent" x:fmla='="Closed"'>Closed</TD></TR></TBODY></TABLE>

As you can see I am filtering for all data falling within the last six months from today. Furthermore, I am filtering on a column headed "Closed", which works terrifically. Everytime I attempt to filter for the date in the TS-SO-ISSUED column it runs the filter but returns no rows of data.

Can someone please enlighten me as to a remedy for this problem. Much Thanks,

Brian
 
It wasn't a hard-coded number, it was actually a date - though I know it doesn't look like one.

Lol okay thanks. I thought it was a hardcoded date serial number. You're always teaching me thanks.


I define the start and end dates in AA4:AA5

AA4: =DATE(YEAR(TODAY()), MONTH(TODAY()) - 6, DAY(TODAY()))
AA5: =TODAY()

Then the criteria

Z2: =">=" &AA4
AA2: ="<="&AA5

This is literally perfect.

Thank you both so much. You're really helping me look great here. Both of you have a great day! :)
 
Upvote 0

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

Forum statistics

Threads
1,214,952
Messages
6,122,457
Members
449,083
Latest member
Ava19

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