Weeknum() --> First Day of Week

Swordfishtrombone

New Member
Joined
Jan 25, 2011
Messages
47
Hi,

I have a cell (A1) that is contains a date and time (e.g.: 8/1/2018 8:00 AM)
I have another cell that uses the WEEKNUM() function to convert that date and time info to a number (The date 8/1/2018 converts to 31).
What I would like to do is to convert that number (31) to the first date of that week (7/29/2018).
I don't really care if the week starts on Sun or Mon...


Thanks in advance.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Start on sunday:

=INT(A1)-CHOOSE(WEEKDAY(A1),0,1,2,3,4,5,6)

Or monday:

=INT(A1)-CHOOSE(WEEKDAY(A1),6,0,1,2,3,4,5)
 
Upvote 0
Probably. I dont know the rules for US week numbers though. Does this not give what you asked for?
 
Upvote 0
can I get to the answer using only the WEEKNUM (31 in this example) without using the date in cell A1?
Then what date do you want to use? The current date?
If so, just use TODAY()
 
Last edited:
Upvote 0
I wanted to post my solution just to close this out.
Thanks for the help!

I multiplied the current WEEKNUM by 7 to get the day number for the start of the week.
Then I added that number of days to Jan 1 to get to the first day of the WEEKNUM, then converted that to a date.

Thanks for the responses!
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,304
Members
452,633
Latest member
DougMo

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