View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default VBA to scan range

MsgBox Evaluate("=MAX(IF(WEEKDAY(C2:AA2)=6,C2:AA2))")

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"David" wrote in message
...
My range, C2:AA2 contains weekday dates for any given month.
I want code that will look through that range and find the last Friday.
eg. lastFri = ActiveSheet.Range("C2:AA2").Find(<the last Friday)
For my needs, this must be a VBA solution.

Any help?

--
David