calculate salary

gssachin

Board Regular
Joined
Nov 14, 2013
Messages
155
Hi,

I want to pay a salary of 50000 INR pm from 10-04-2020 to 18-08-2020. We are calculating working days for April, may, June, July & Aug after removing Fridays (i.e. for apr – 26 days, may – 26 days, jun & July -26 days & Aug 27 days

I m using networkdays.int formula for calculating days

i.e. NETWORKDAYS.INTL(10-04-2020,(18-08-2020-1),16) = 112 days

so I need formula/macro to calculate this so system will calculate

(10-04-2020 to 30-04-2020)/26* Amt (April working days after removing Friday )

(01-05-2020 to 31-05-2020)/26* Amt (May working days after removing Friday )

(01-06-2020 to 30-06-2020)/26* Amt (June working days after removing Friday )

(01-07-2020 to 31-07-2020)/26 * Amt (July working days after removing Friday )

(01-08-2020 to 18-08-2020)/27 * Amt (Aug working days after removing Friday )
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Your information is unclear but the following may help.

T202006b.xlsm
ABCDE
1Amount50000
2Term10-Apr-2018-Aug-20112446.4286
3
410-Apr-2030-Apr-20188035.714
501-May-2031-May-202611607.14
601-Jun-2030-Jun-202611607.14
701-Jul-2031-Jul-202611607.14
801-Aug-2018-Aug-20167142.857
950000
10
2a
Cell Formulas
RangeFormula
D2,D4:D8D2=NETWORKDAYS.INTL(B2,C2,16)
E2E2=D1/D2
E4:E8E4=$E$2*D4
E9E9=SUM(E4:E8)
 
Upvote 0
Dear Sir,

Sorry for the inconvenience. I want to get a total payable salary in one cell only. also, salary should calculate 50000/no of working days for each month (after removing Friday)*no of days work (i.e. d column in your calculation) And my Answer is INR 215384.615 for 112 Days
 
Upvote 0
You stated " my Answer is INR 215384.615 for 112 Days".

Please show how you calculated this number.
 
Upvote 0
T202006b.xlsm
BCDEF
1
2StartEndPer MonthTotal
310-Apr-2018-Aug-2050,000.00214,245.01
4
510-Apr-2030-Apr-20182634,615.38
601-May-2031-May-20262650,000.00
701-Jun-2030-Jun-20262650,000.00
801-Jul-2031-Jul-20262650,000.00
901-Aug-2018-Aug-20162729,629.63
10112131214,245.01
11
12StartFull MonthsEndTotal
1334,615.38150,000.0029,629.63214,245.01
14
2a
Cell Formulas
RangeFormula
E3E3=NETWORKDAYS.INTL(MAX(B5,EOMONTH(B5,-1)+1),MIN(EOMONTH(B5,0),C5),16)/NETWORKDAYS.INTL(EOMONTH(B5,-1)+1,EOMONTH(C5,0),16)*D3+3*D3+NETWORKDAYS.INTL(MAX(B9,EOMONTH(B9,-1)+1),MIN(EOMONTH(B9,0),C9),16)/NETWORKDAYS.INTL(EOMONTH(B9,-1)+1,EOMONTH(C9,0),16)*D3
D5:D9D5=NETWORKDAYS.INTL(MAX(B5,EOMONTH(B5,-1)+1),MIN(EOMONTH(B5,0),C5),16)
E5:E9E5=NETWORKDAYS.INTL(EOMONTH(B5,-1)+1,EOMONTH(C5,0),16)
F5:F9F5=D5/E5*$D$3
D10:F10D10=SUM(D5:D9)
C13C13=NETWORKDAYS.INTL(MAX(B5,EOMONTH(B5,-1)+1),MIN(EOMONTH(B5,0),C5),16)/NETWORKDAYS.INTL(EOMONTH(B5,-1)+1,EOMONTH(C5,0),16)*D3
D13D13=3*D3
E13E13=NETWORKDAYS.INTL(MAX(B9,EOMONTH(B9,-1)+1),MIN(EOMONTH(B9,0),C9),16)/NETWORKDAYS.INTL(EOMONTH(B9,-1)+1,EOMONTH(C9,0),16)*D3
F13F13=SUM(C13:E13)
 
Upvote 0
T202006b.xlsm
BCDEF
2StartEndPer MonthTotal
310-Apr-2018-Aug-2050,000.00214,245.01214,245.01
4
2a
Cell Formulas
RangeFormula
E3E3=NETWORKDAYS.INTL(MAX(B3,EOMONTH(B3,-1)+1),MIN(EOMONTH(B3,0),C3),16)/NETWORKDAYS.INTL(EOMONTH(B3,-1)+1,EOMONTH(B3,0),16)*D3+(DATEDIF(B3-DAY(B3)+1,EOMONTH(C3,0)+1,"m")-2)*D3+NETWORKDAYS.INTL(MIN(C3,EOMONTH(C3,-1)+1),MIN(EOMONTH(C3,0),C3),16)/NETWORKDAYS.INTL(EOMONTH(C3,-1)+1,EOMONTH(C3,0),16)*D3
F3F3=NETWORKDAYS.INTL(MAX(B3,EOMONTH(B3,-1)+1),MIN(EOMONTH(B3,0),C5),16)/LOOKUP(B3,NumWD)*D3+(DATEDIF(B3-DAY(B3)+1,EOMONTH(C3,0)+1,"m")-2)*D3+NETWORKDAYS.INTL(MAX(B3,EOMONTH(C3,-1)+1),MIN(EOMONTH(C3,0),C3),16)/LOOKUP(C3,NumWD)*D3
Named Ranges
NameRefers ToCells
NumWD='2a'!$L$1:$M$12F3
 
Upvote 0
You are an awsome boss...

I provided data in my broken English still u find the way and amaze me. I used formula in "E3" becoz I having start date, end date, and Amount column.... And its works for me.....

Thanks a lot..... ?
 
Upvote 0
2 suggestions that are a little cleaner.
One puts the Lookup table that calculates the workdays for each month into a named array.

T202006b.xlsm
BCDEFG
1
2StartEndPer MonthTotalTotal
310-Apr-2018-Aug-2050,000.00214,245.01214,245.01
415-Jan-2012-Dec-2054,000.00589,076.92589,076.92
5
2a
Cell Formulas
RangeFormula
F3:F4F3=(NETWORKDAYS.INTL(B3,EOMONTH(B3,0),16)/NETWORKDAYS.INTL(B3-DAY(B3)+1,EOMONTH(B3,0),16)+(DATEDIF(B3-DAY(B3)+1,EOMONTH(C3,0)+1,"m")-2)+NETWORKDAYS.INTL(C3-DAY(C3)+1,C3,16)/NETWORKDAYS.INTL(C3-DAY(C3)+1,EOMONTH(C3,0),16))*D3
G3:G4G3=(NETWORKDAYS.INTL(B3,EOMONTH(B3,0),16)/LOOKUP(B3,N_WD)+(DATEDIF(B3-DAY(B3)+1,EOMONTH(C3,0)+1,"m")-2)+NETWORKDAYS.INTL(C3-DAY(C3)+1,C3,16)/LOOKUP(C3,N_WD))*D3


N_WD means Number of Work Days for each month
See Name Manager N_WD ={43831,26;43862,25;43891,27;43922,26;43952,26;43983,26;44013,26;44044,27;44075,26;44105,26;44136,26;44166,27}
 
Upvote 0
T202006b.xlsm
BCDE
2StartEndPer MonthTotal
310-Apr-2018-Aug-2050,000.00214,245.01
415-Jan-2012-Dec-2054,000.00589,076.92
517-Mar-2024-Apr-2080,000.00100,056.98
2a
Cell Formulas
RangeFormula
E3:E5E3=(NETWORKDAYS.INTL(B3,EOMONTH(B3,0),16)/LOOKUP(B3,N_WD)+(MONTH(C3)-MONTH(B3)-1)+NETWORKDAYS.INTL(C3-DAY(C3)+1,C3,16)/LOOKUP(C3,N_WD))*D3
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,865
Members
449,052
Latest member
Fuddy_Duddy

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