If you want to exactly replicate WEEKNUM(A1) where A1 contains a date try this formula

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