Hi,
I think this will work, using WEEKNUM to check the number of the week for Start Date, End Date and D2. I've also replaced your AG<0 with AG="" and I've used TODAY() not NOW() as it's just the date that matters, not the time.
In English, if End Date is blank, this will subtract the week number of the Start Date from the week number of Today if the Start Date is after D2, otherwise it'll subtract the week number of D2 from Today's.
If there is an End Date, it'll subtract the Start Date week number from the End Date week number if the Start Date is after D2, otherwise it'll subtract D2's week number from the End Date's.
Running this on row 8 gives an answer of 20 for today, which looks to be correct to me, having manually counted weeks on a calendar.
Hope that works for you.
Regards,
Aardigspook
If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark Thread as Solved'.
You don't need to give me rep if I helped, but thanks are appreciated.
Bookmarks