# Partial Weeks

#### svickers423

##### New Member
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.

 Date Day Num of Week Day Date Num Week Month Year Start of week date End of week date 1/27/2019 1 27 5 1 2019 1/28/2019 2 28 5 1 2019 1/29/2019 3 29 5 1 2019 1/30/2019 4 30 5 1 2019 1/31/2019 5 31 5 1 2019 2/1/2019 6 1 5 2 2019 2/2/2019 7 2 5 2 2019 2/3/2019 1 3 6 2 2019 2/4/2019 2 4 6 2 2019

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

Thanks in advance for any assistance!

#### mrshl9898

##### Well-known Member
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

#### svickers423

##### New Member
Seems to work like a champ!!! Thanks for the assistance!

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

### 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...