Pay Period Dates Formula

joditpg

New Member
Joined
Sep 28, 2017
Messages
1
Hi,

I couldn't find the answer to this sorry if it was posted already:

I have a timesheet that I would like to autofill the payperiod end date once the pay period begin date is plugged in, BUT if the pay period begin date is left blank I would like this cell to also be left blank(currently it plugsi n a random date if pay period begin cell is left blank.)

What I've been trying so far is the following:

=IF(And(DAY(C3)<15,C3>0),DATE(YEAR(C3),MONTH(C3),15,if(day(c3)>15,DATE(YEAR(C3),MONTH(C3)+1,if(C3="",""))))

for Example if the pay period begin date is January 1, 2018, it would autofill January 15, 2018. That part I got to work by using this formula:=IF(DAY(C3)<15,DATE(YEAR(C3),MONTH(C3),15),DATE(YEAR(C3),MONTH(C3)+1,0))

So again the problem is if the pay period begin date is not filled in, a random weird date plugs into the pay period end cell - which I would like left blank.

Thank you!
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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