ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   WEEKNUM Function (https://www.excelbanter.com/excel-worksheet-functions/120208-weeknum-function.html)

Trevor Aiston

WEEKNUM Function
 
Is there a switch I can use with weeknum function that will calculate week
numbers based on UK tax year rather than calender year?

TIA

Trevor



Jon von der Heyden

WEEKNUM Function
 
Try: =INT((A1-DATE(YEAR(A1)-(TEXT(A1,"mdd")+0<406),3,30))/7)

Where A1 houses the date you want to return the weeknum for.

Regards
Jon von der Heyden
--
Email: subst1tut3 numb3rs for l3tt3rs...


"Trevor Aiston" wrote:

Is there a switch I can use with weeknum function that will calculate week
numbers based on UK tax year rather than calender year?

TIA

Trevor




Bob Phillips

WEEKNUM Function
 
I don't think it is straight-forward, a the tax year starts on 5th April,
which could be any day of the week, whereas WEEKNUM functions are based upon
a week starting on a particular day.

If the week number is solely based upon the start date, then use

=INT((target_date-tax_year_start_date)/7)+1

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Trevor Aiston" wrote in message
...
Is there a switch I can use with weeknum function that will calculate week
numbers based on UK tax year rather than calender year?

TIA

Trevor





Jon von der Heyden

WEEKNUM Function
 
Try: =INT((A1-DATE(YEAR(A1)-(TEXT(A1,"mdd")+0<406),3,30))/7)

Where A1 houses the date you want to return the week num for.

Regards
Jon von der Heyden
--
Email: subst1tut3 numb3rs for l3tt3rs...


"Trevor Aiston" wrote:

Is there a switch I can use with weeknum function that will calculate week
numbers based on UK tax year rather than calender year?

TIA

Trevor





All times are GMT +1. The time now is 07:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com