JackDanIce
Well-known Member
- Joined
- Feb 3, 2010
- Messages
- 9,922
- Office Version
- 365
- Platform
- Windows
Hi,
I have the following code:
Which is receives an Excel table and is meant to filter column 3 for the max date in column 3; formatted as date, UK settings.
Unfortunately it only filters for every value with month January, the column itself is a formula-column to return the preceding Monday vs a given date with formula:
Can anyone suggest a correction to the code please?
Thank you in advance,
Jack
I have the following code:
VBA Code:
Sub Latest_Monday(ByRef tbl As ListObject)
tbl.Range.AutoFilter field:=3, Operator:=xlFilterValues, Criteria2:=Array(1, CDate(Application.Max(Range("Tbl_Data[Monday]"))))
End Sub
Which is receives an Excel table and is meant to filter column 3 for the max date in column 3; formatted as date, UK settings.
Unfortunately it only filters for every value with month January, the column itself is a formula-column to return the preceding Monday vs a given date with formula:
Excel Formula:
=WEEKDAY([@[Open Date],2)+1
Can anyone suggest a correction to the code please?
Thank you in advance,
Jack