Counting Salary within certain dates, taking into account employment status

Cjhicks2708

New Member
Joined
Jul 13, 2021
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Hi, I am looking to calculate total salary month on month, but need to also consider if the person is still employed. What i am looking to do is present a month on month total spent on salaries. I have the hire date and the employment status. I am not sure if i should be using a countif here?

Book1
ABCDEFGHI
1Employment StatusHire DateProbabtion DateEnd datePay rateBase CurrencyPaid perPay typeSalary £
2Terminated24/02/202023/07/202027/11/2020£ 43,400.00GBPYearSalary£ 43,400.00
3Full-Time14/11/201912/04/2020£ 52,500.00GBPYearSalary£ 52,500.00
4Full-Time07/09/202004/02/2021£ 49,000.00GBPYearSalary£ 49,000.00
5Terminated29/10/201828/03/201910/01/2020$ 75,478.90USDYearSalary£ 54,344.81
6Terminated01/07/201928/11/201908/07/2020£ 63,000.00GBPYearSalary£ 63,000.00
7Terminated06/01/202004/06/202006/10/2020£ 35,000.00GBPYearSalary£ 35,000.00
8Terminated02/08/201730/12/2017$ 61,600.00USDYearSalary£ 44,352.00
9Full-Time29/04/201926/09/2019£ 28,000.00GBPYearSalary£ 28,000.00
10Full-Time11/09/201708/02/2018$ 120,615.60USDYearSalary£ 86,843.23
11Terminated30/03/202027/08/202030/04/2021£ 25,900.00GBPYearSalary£ 25,900.00
12Full-Time10/06/201907/11/2019£ 38,500.00GBPYearSalary£ 38,500.00
13Terminated24/07/201721/12/201713/01/2020$ 105,538.30USDYearSalary£ 75,987.58
14Terminated02/12/201930/04/202015/07/2020£ 42,000.00GBPYearSalary£ 42,000.00
15Full-Time18/02/201918/07/2019£ 37,100.00GBPYearSalary£ 37,100.00
16Full-Time21/09/202018/02/2021£ 21,000.00GBPYearSalary£ 21,000.00
17Full-Time28/09/202025/02/2021£ 70,000.00GBPYearSalary£ 70,000.00
18Full-Time25/11/201923/04/2020£ 47,600.00GBPYearSalary£ 47,600.00
19Full-Time13/01/202011/06/2020£ 21,000.00GBPYearSalary£ 21,000.00
20Terminated27/04/202024/09/202031/03/2021£ 33,600.00GBPYearSalary£ 33,600.00
21Full-Time15/07/201912/12/2019£ 24,500.00GBPYearSalary£ 24,500.00
22Full-Time28/09/202025/02/2021£ 59,500.00GBPYearSalary£ 59,500.00
23Full-Time13/01/202011/06/2020€ 88,200.00EURYearSalary£ 74,970.00
24Terminated16/09/201913/02/202014/08/2020£ 53,900.00GBPYearSalary£ 53,900.00
25Terminated24/06/201921/11/201931/12/2019£ 31,500.00GBPYearSalary£ 31,500.00
26Full-Time01/03/201929/07/2019£ 37,056.25GBPYearSalary£ 37,056.25
Sheet1
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
You could do it with a couple of SUMIFS formulas. Put a date in K2 then use:

=SUMIFS(I:I,D:D,"",B:B,"<="&K2)/12+SUMIFS(I:I,D:D,">="&K2,B:B,"<="&K2)/12

You can then add additional dates into K3, K4 etc and drag down.

Or maybe a sumproduct:

=SUMPRODUCT(($I$2:$I$100/12),--($B$2:$B$100<=K2),--(($D$2:$D$100>=K2)+($D$2:$D$100="")))
 
Upvote 0
I first placed the value 1/1/1999 in cell J1
then I placed the formula below into cells K1 thru U1
Excel Formula:
=DATE(YEAR(J1),MONTH(J1)+1,1)
Then I entered the formula below in cells J2 thru U26
Excel Formula:
=IF($B2<=J$1,IF(OR(ISBLANK($D2),$D2>=J$1),$I2/12,0),0)
then I summed columns J thru U to get the monthly salary for each month

You can change the value in cell J1 to begin any year to check the monthly results for that year.

Book1 (1).xlsx
ABCDEFGHIJKLMNOPQRSTUV
1Employment StatusHire DateProbabtion DateEnd datePay rateBase CurrencyPaid perPay typeSalary £01/01/202101/02/202101/03/202101/04/202101/05/202101/06/202101/07/202101/08/202101/09/202101/10/202101/11/202101/12/2021Total for Year
2Terminated24/02/202023/07/202027/11/202043400GBPYearSalary43400-------------
3Full-Time14/11/201912/04/202052500GBPYearSalary525004,375.004,375.004,375.004,375.004,375.004,375.004,375.004,375.004,375.004,375.004,375.004,375.0052,500.00
4Full-Time07/09/202004/02/202149000GBPYearSalary490004,083.334,083.334,083.334,083.334,083.334,083.334,083.334,083.334,083.334,083.334,083.334,083.3349,000.00
5Terminated29/10/201828/03/201910/01/202075478.9USDYearSalary54344.808-------------
6Terminated01/07/201928/11/201908/07/202063000GBPYearSalary63000-------------
7Terminated06/01/202004/06/202006/10/202035000GBPYearSalary35000-------------
8Terminated02/08/201730/12/201761600USDYearSalary443523,696.003,696.003,696.003,696.003,696.003,696.003,696.003,696.003,696.003,696.003,696.003,696.0044,352.00
9Full-Time29/04/201926/09/201928000GBPYearSalary280002,333.332,333.332,333.332,333.332,333.332,333.332,333.332,333.332,333.332,333.332,333.332,333.3328,000.00
10Full-Time11/09/201708/02/2018120615.6USDYearSalary86843.2327,236.947,236.947,236.947,236.947,236.947,236.947,236.947,236.947,236.947,236.947,236.947,236.9486,843.23
11Terminated30/03/202027/08/202030/04/202125900GBPYearSalary259002,158.332,158.332,158.332,158.33--------8,633.33
12Full-Time10/06/201907/11/201938500GBPYearSalary385003,208.333,208.333,208.333,208.333,208.333,208.333,208.333,208.333,208.333,208.333,208.333,208.3338,500.00
13Terminated24/07/201721/12/201713/01/2020105538.3USDYearSalary75987.576-------------
14Terminated02/12/201930/04/202015/07/202042000GBPYearSalary42000-------------
15Full-Time18/02/201918/07/201937100GBPYearSalary371003,091.673,091.673,091.673,091.673,091.673,091.673,091.673,091.673,091.673,091.673,091.673,091.6737,100.00
16Full-Time21/09/202018/02/202121000GBPYearSalary210001,750.001,750.001,750.001,750.001,750.001,750.001,750.001,750.001,750.001,750.001,750.001,750.0021,000.00
17Full-Time28/09/202025/02/202170000GBPYearSalary700005,833.335,833.335,833.335,833.335,833.335,833.335,833.335,833.335,833.335,833.335,833.335,833.3370,000.00
18Full-Time25/11/201923/04/202047600GBPYearSalary476003,966.673,966.673,966.673,966.673,966.673,966.673,966.673,966.673,966.673,966.673,966.673,966.6747,600.00
19Full-Time13/01/202011/06/202021000GBPYearSalary210001,750.001,750.001,750.001,750.001,750.001,750.001,750.001,750.001,750.001,750.001,750.001,750.0021,000.00
20Terminated27/04/202024/09/202031/03/202133600GBPYearSalary336002,800.002,800.002,800.00---------8,400.00
21Full-Time15/07/201912/12/201924500GBPYearSalary245002,041.672,041.672,041.672,041.672,041.672,041.672,041.672,041.672,041.672,041.672,041.672,041.6724,500.00
22Full-Time28/09/202025/02/202159500GBPYearSalary595004,958.334,958.334,958.334,958.334,958.334,958.334,958.334,958.334,958.334,958.334,958.334,958.3359,500.00
23Full-Time13/01/202011/06/202088200EURYearSalary749706,247.506,247.506,247.506,247.506,247.506,247.506,247.506,247.506,247.506,247.506,247.506,247.5074,970.00
24Terminated16/09/201913/02/202014/08/202053900GBPYearSalary53900-------------
25Terminated24/06/201921/11/201931/12/201931500GBPYearSalary31500-------------
26Full-Time01/03/201929/07/201937056.25GBPYearSalary37056.253,088.023,088.023,088.023,088.023,088.023,088.023,088.023,088.023,088.023,088.023,088.023,088.0237,056.25
2762,618.4662,618.4662,618.4659,818.4657,660.1257,660.1257,660.1257,660.1257,660.1257,660.1257,660.1257,660.12708,954.82
Sheet3
Cell Formulas
RangeFormula
K1:U1K1=DATE(YEAR(J1),MONTH(J1)+1,1)
J2:U26J2=IF($B2<=J$1,IF(OR(ISBLANK($D2),$D2>=J$1),$I2/12,0),0)
V2:V27V2=SUM(J2:U2)
J27:U27J27=SUM(J2:J26)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,064
Messages
6,122,942
Members
449,094
Latest member
teemeren

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