Thread: Forulma Needed
View Single Post
  #17   Report Post  
Ken Wright
 
Posts: n/a
Default

when you say "If x were an array" do you mean the date?

That was Harlan's post you are referring to, but what he meant was that if x was
a range of dates that represented your array, ag B1:Z1 and as he stated, you
wanted what should be the array result from WEEKNUM(x), then you would
substitute your range for x in his formula

=1+INT((x-DATE(YEAR(x),1,1)+WEEKDAY(DATE(YEAR(x),1,1),2))/7)

giving you

=1+INT((B1:Z1-DATE(YEAR(B1:Z1),1,1)+WEEKDAY(DATE(YEAR(B1:Z1),1,1 ),2))/7)

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------



"PR" wrote in message
...
Ken,
when you say "If x were an array" do you mean the date?

Paul




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.801 / Virus Database: 544 - Release Date: 24/11/2004