Google SpredSheetでのAnalyticsの集計で週単位の期間を表示する方法

B2にga:yearWeekを表示しているときの式

=IF(B2="","",IF(MID(B2,5,2)="01",TEXT(DATE(MID(B2,1,4),1,1),"YYYY/MM/DD"),TEXT(DATE(MID(B2,1,4),1,1)+7*(MID(B2,5,2)-2)+7-WEEKDAY(DATE(MID(B2,1,4),1,1))+1,"YYYY/MM/DD"))&"~"&IF(MID(B2,5,2)="53",TEXT(MID(B2,1,4)&"/12/31","YYYY/MM/DD"),IF(MID(B2,5,2)="01",TEXT(DATE(MID(B2,1,4),1,1)+7*(MID(B2,5,2)-2)+7-WEEKDAY(DATE(MID(B2,1,4),1,1))+7,"yyyy/mm/dd"),TEXT(DATE(MID(B2,1,4),1,1)+7*(MID(B2,5,2)-2)+7-WEEKDAY(DATE(MID(B2,1,4),1,1))+7,"yyyy/mm/dd"))))