Get first date of following weeknumber

mucah!t

Well-known Member
Joined
Jun 27, 2009
Messages
593
Hello all,

The following formula returns the weeknumber of any given date:
[ISO standard]

Code:
=IF(AP12="","",INT((AP12-WEEKDAY(AP12,2)-DATE(YEAR(AP12+4-WEEKDAY(AP12,2)),1,4))/7)+2)

I'd like cell B1 to check the date in A1 [lets say 02-jan 2011] and return the first date of the next weeknumber [mon 03-jan 2011]
Offcourse only if not already the first date of a week is given.

Ideas?
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Hi,

Assuming the first weekday as monday, maybe this
B1
=A1+(8-WEEKDAY(A1,2))*(WEEKDAY(A1,2)<>1)

HTH

M.
 
Upvote 0
This formula will give the same result

=A1+7-WEEKDAY(A1-2)

Hi Barry,

Your formula is much more simpler, but i'm not fully understanding the logic behind. :confused:

I think you used A1-2 because the first day of week, in this case, is monday. Am i right?

M.
 
Upvote 0
That's right Marcelo, you can adjust the -2 depending on the day of the week, if you change to -1 you'll get the next Sunday....if you make it -3 you'll get the next Tuesday etc....
 
Upvote 0

Forum statistics

Threads
1,224,514
Messages
6,179,219
Members
452,895
Latest member
BILLING GUY

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top