Home |
Search |
Today's Posts |
#9
![]() |
|||
|
|||
![]()
Hi!
Don't know anything about VBA but when I try this I get a compile syntax error with this section highlighted: myarray(Month(cell.Value)) = _ WorksheetFunction.Min(Day(cell.Value), Biff wrote in message ... I have also tried to do this as an array and drawn a blank however a UDF if it would help Function MaxDate(myRange As Range) As Integer Dim myarray(1 To 12) As Integer For Each cell In myRange If myarray(Month(cell.Value)) < 0 Then myarray(Month(cell.Value)) = _ WorksheetFunction.Min(Day(cell.Value), myarray(Month(cell.Value))) Else myarray(Month(cell.Value)) = Day(cell.Value) End If Next cell MaxDate = WorksheetFunction.Max(myarray) End Function Feels like brute force though hth RES |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I create a schedule from a list of dates ? | Charts and Charting in Excel | |||
Recurring annual events using a specific date as a trigger date | Excel Worksheet Functions | |||
extract date from the most current date | Excel Discussion (Misc queries) | |||
Need help troubleshooting an array formula XLXP on Win2K | Excel Worksheet Functions | |||
Addition to Turn cell red if today is greater or equal to date in cell | New Users to Excel |