Thread: Max date
View Single Post
  #11   Report Post  
Biff
 
Posts: n/a
Default

Hi!

Here's one way but requires a helper row...

Dates in A2:G2

In A3 enter this formula and copy across to G3:

=IF(SUMPRODUCT(--(MONTH($A2:A2)=MONTH(A2)))1,"",1)

Formula for the max day (still an array formula):

=MAX(DAY(IF(A3:G3=1,A2:G2)))

You can use this until someone comes up with something better. I'll keep
trying for something better that doesn't need a helper. I'm close!

Biff

"Maxi" wrote in message
oups.com...
No, months can be different. There can be a month with 2004 as year and
same month with 2005. Yes, dates will always be in ascending order.

If not a formula, even a VBA would do. I am tired of thinking a logic
on how to get this issue resolved.

Maxi