Hi All,

Im trying to save myself some time and create loads of new functions in my Perosnal macro workbook.

At the moment i'm trying to create a function that converts a given date into its corresponding week number.

i know the formula to do this is as follows:

=TRUNC(A1-Date(Year(A1),0,0)+6))/7)
Where A1 = the cell reference that contains the date.

Obviously my function would start as follows:

Function WeeknUmber(Date1)
     WeekNumber = ???????
I'm just not sure on how to work the formula into this function?

Please help

thanks for reading my thread everyone