Prev Previous Post   Next Post Next
  #9   Report Post  
Biff
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I create a schedule from a list of dates ? Gavin Morris Charts and Charting in Excel 2 October 28th 10 04:08 PM
Recurring annual events using a specific date as a trigger date Bamboozled Excel Worksheet Functions 1 June 6th 05 01:44 PM
extract date from the most current date Cali00 Excel Discussion (Misc queries) 1 April 13th 05 02:05 PM
Need help troubleshooting an array formula XLXP on Win2K KR Excel Worksheet Functions 1 December 13th 04 07:41 PM
Addition to Turn cell red if today is greater or equal to date in cell Rich New Users to Excel 2 December 9th 04 02:06 AM


All times are GMT +1. The time now is 07:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"