Contract with start and end date in a specific quarter

psvhans

New Member
Joined
Sep 23, 2016
Messages
3
Hi All,

I have a list of contracts with all different start and end dates. Could be any date. I would like to see per contract for which quarter(s) they are valid.
Also if a contract is just 2 days open in a quarter, I need to mark them as YES open in that quarter.

See below table. Any nice formula to get these yes/no's?


ContractStart dateEnd dateQ1-16Q2-16Q3-16Q4-16Q1-17Q2-17Q3-17Q4-17
A01-01-201601-05-2016YesYesNoNoNoNoNoNo
B10-04-201615-10-2016NoYesYesYesNoNoNoNo
C01-08-201610-01-2017NoNoYesYesYesNoNoNo

<tbody>
</tbody>
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
I would start by adding in 2 rows with the quarter start date and end date. You can hide them afterwards.

You can then use the following:

Code:
=IF(AND(D$2>$B4,D$3<$C4),"Yes",IF(AND($B4>=D$2,$B4<=D$3),"Yes",IF(AND($C4>=D$2,$C4<=D$3),"Yes","No")))


Where Row 1 has your original headings,
Where Row 2 has quarter start dates,
Where Row 3 has quarter end dates,
Where Column A has Contract Names
Where Column B has Contract Start Dates,
Where Column C has Contract End Dates,
 
Upvote 0

Forum statistics

Threads
1,216,118
Messages
6,128,939
Members
449,480
Latest member
yesitisasport

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