Have a column of dates (first of each month) and need a function to add a number if the first of the month falls between two dates

danielrussell2

New Member
Joined
Mar 17, 2016
Messages
17
I am trying to set up an excel to show income and expenses for each period, on a two week pay schedule.

I have the beginning date of the pay period in column A (starting at A8), the end of the pay period in column B (starting at B8). In column C I am trying to show what the income will be for that pay period...of course the salary pay will be the same for each pay period, but there's also once a month incomes to consider. The one I'm trying to add right now is paid the first of each month. So in a column over to the side (column Y), I made a list of all of the first of the month dates (06/01/18, 07/01/18, 08/01/18, etc.). I need a function that will add the amount of the once a month income (listed in cell C3) IF the date in column Y (the first of the month) falls within the date range in columns A and B (both start at row 8). I made a table below to reflect what my excel sheet looks like. Thanks in advance for your help!

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]..[/TD]
[TD]..[/TD]
[TD]Y[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD]2 week salary[/TD]
[TD]Once a month
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Amount
[/TD]
[TD]1000[/TD]
[TD]200[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Day of Month[/TD]
[TD][/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Monthly
[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]Pay Date[/TD]
[TD]Period End[/TD]
[TD]Income[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]06/01/18[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]05/25[/TD]
[TD]06/07[/TD]
[TD]=B3+?????[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]07/01/18[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]06/08[/TD]
[TD]06/21[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]08/01/18[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]06/22[/TD]
[TD]07/05[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]09/01/18[/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]07/06[/TD]
[TD]07/19[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]10/01/18[/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD]07/20[/TD]
[TD]08/02[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]11/01/18[/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]08/03[/TD]
[TD]08/16[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]12/01/18[/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD]08/17[/TD]
[TD]08/30[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]01/01/19[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
figured out another way to do this not using the Y column I set up:

=$B$3+(if(A8<=(B8-DAY(B8)+1),if(B8>=(B8-DAY(B8)+1),$C$3,0),0))
 
Upvote 0

Forum statistics

Threads
1,224,910
Messages
6,181,678
Members
453,062
Latest member
blackyblack

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