Partial Weeks

svickers423

New Member
Joined
Aug 23, 2015
Messages
3
I am trying to create a formula or script that will identify partial weeks. The end goal will be to yield if a month ends in the middle of the week I want to have the week start date be the same and the end of week be the last day of the month and the start of the next month be the first day of the week. Weeks start on Sunday and end on Saturday. My dates start in column A2 and go down the row-
In the below the end result would be in the 'Start of week column' would be for 1/27/2019 - the start of week would be 1/27/2019 and EOW would be 1/31/2019 and for 2/1/2019 the start of week would be 2/1/2019 and EOW would be 2/2/2019. All full weeks in the month would hold true to the Sunday date is the start and the EOW would be the Saturday date of that week.

DateDay Num of WeekDay Date NumWeekMonthYearStart of week dateEnd of week date
1/27/2019127512019
1/28/2019228512019
1/29/2019329512019
1/30/2019430512019
1/31/2019531512019
2/1/201961522019
2/2/201972522019
2/3/201913622019
2/4/201924622019

<colgroup><col><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>

Thanks in advance for any assistance!
 

mrshl9898

Well-known Member
Joined
Feb 6, 2012
Messages
951
Try:

G2 =MAX(DATE(F2,E2,1),DATE(F2,E2,IF(B2=1,C2,C2-B2+1)))
H2 =MIN(EOMONTH(A2,0),DATE(F2,E2,IF(B2=7,C2,C2-B2+7)))

*Don't know if dd/mm/yyyy interferes
 

Forum statistics

Threads
1,081,969
Messages
5,362,484
Members
400,677
Latest member
champchamp

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top