Date in one cell results value in another

wmichael

Board Regular
Joined
Aug 26, 2014
Messages
113
Office Version
  1. 365
  2. 2019
  3. 2007
Platform
  1. Windows
  2. Mobile
Hello. I am seeking a formula that will recognize a date in one cell and show the week of the month it is in another cell. Please see the following examples- thank you, Michael.

Date range 1-7= Week 1
Date range 8-14= Week 2
Date range 15-21= Week 3
Date range 22-31= Week 4

<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>[TABLE="width: 0"]
<tbody>[TR]
[TD="align: center"]CURRENT DATE FROM[/TD]
[TD="align: center"]WEEK[/TD]
[/TR]
[TR]
[TD="align: center"]Sun, Nov 12, 2017[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]Tue, Nov 14, 2017[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD="align: center"]Sun, Feb 18, 2018[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD="align: center"]Tue, Sep 4, 2018[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]Mon, Nov 12, 2018[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD="align: center"]Sat, Mar 3, 2018[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]Fri, Jan 12, 2018[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD="align: center"]Sat, Mar 3, 2018[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]Sun, May 21, 2017[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD="align: center"]Thu, Feb 1, 2018[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]Tue, Jul 25, 2017[/TD]
[TD="align: center"]4[/TD]
[/TR]
[TR]
[TD="align: center"]Sat, Sep 23, 2017[/TD]
[TD="align: center"]4[/TD]
[/TR]
[TR]
[TD="align: center"]Sat, May 19, 2018[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD="align: center"]Tue, Oct 2, 2018[/TD]
[TD="align: center"]1[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
.
Assuming your dates begin in A1 ... paste this formula in B1 and drag down the column :

Code:
=WEEKNUM(A1,1)-WEEKNUM(DATE(YEAR(A1),MONTH(A1),1),1)+1
 
Upvote 0
Using your date ranges, I would use the following and fill down the dates (assuming they start in A2)

=INDEX({1,2,3,4},MATCH(DAY(A2),{1,8,15,22},1))
 
Upvote 0
.
Assuming your dates begin in A1 ... paste this formula in B1 and drag down the column :

Code:
=WEEKNUM(A1,1)-WEEKNUM(DATE(YEAR(A1),MONTH(A1),1),1)+1

This worked Great- thank you!
 
Upvote 0

Forum statistics

Threads
1,223,954
Messages
6,175,601
Members
452,658
Latest member
GStorm

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