YasserKhalil
Well-Known Member
Hello everyone
In my attachment I have start date and end date in cells C1 & C2 and in cells C4:C6 the difference between these two dates
I have two cases :
**************
(1) First case if years are less than 3
/////////////////////////////////////////
I need to calculate the reward in that way (cell C7 would contain the formula)
I have 1 Year / 6 Months / 13 Days
So the manual calculation in this case :
Salary * 1 * ((1) + (6/12) + (13/365))
-------------------------------------------------------------
1 After Salary * refers to one salary only in this case
Second one ((1) refers to the number of years in C4
The number 6 refers to the number of months in C5
12 (The number of the months of the year)
13 refers to the number of days in C6
365 refers to the days of the year
(1) Second case if years are greater than 3
///////////////////////////////////////////////
I need to calculate the reward in that way (cell C7 would contain the formula but I put some input in column E for just clarification)
I have in the example 5 Year / 8 Months / 18 Days
So the manual calculation in this case
(Salary * 1 * 3) >> This is the first part .. I mean to take the first three years and multiply them by 1 * 500
Take the rest after subtracting the three years (which will be 2 Years / 8 Months / 18 Days) and calculate them like that
(Salary * 2 * ((2) + (8/12) + (18/365))
2 >> refers to the second case .. here two salaries not just one as the years greater than 3
The second 2 >> refers to the number of years after subtracting 5 - 3
8 >> refers to the number of the months
18 >> refers to the number of days
12 (the number of the months of the year) & 365 (the number of days of the year)
so the final manual calculation for the second case like that
(Salary * 1 * 3) + (Salary * 2 * ((2) + (8/12) + (18/365))
----------------------------------------------------------------
** The first case using excel
The result would be : 767.81
** The second case using excel
The result would be : 4215.98
I need one formula that achieve that task
Thanks advanced for help
In my attachment I have start date and end date in cells C1 & C2 and in cells C4:C6 the difference between these two dates
I have two cases :
**************
(1) First case if years are less than 3
/////////////////////////////////////////
I need to calculate the reward in that way (cell C7 would contain the formula)
I have 1 Year / 6 Months / 13 Days
So the manual calculation in this case :
Salary * 1 * ((1) + (6/12) + (13/365))
-------------------------------------------------------------
1 After Salary * refers to one salary only in this case
Second one ((1) refers to the number of years in C4
The number 6 refers to the number of months in C5
12 (The number of the months of the year)
13 refers to the number of days in C6
365 refers to the days of the year
(1) Second case if years are greater than 3
///////////////////////////////////////////////
I need to calculate the reward in that way (cell C7 would contain the formula but I put some input in column E for just clarification)
I have in the example 5 Year / 8 Months / 18 Days
So the manual calculation in this case
(Salary * 1 * 3) >> This is the first part .. I mean to take the first three years and multiply them by 1 * 500
Take the rest after subtracting the three years (which will be 2 Years / 8 Months / 18 Days) and calculate them like that
(Salary * 2 * ((2) + (8/12) + (18/365))
2 >> refers to the second case .. here two salaries not just one as the years greater than 3
The second 2 >> refers to the number of years after subtracting 5 - 3
8 >> refers to the number of the months
18 >> refers to the number of days
12 (the number of the months of the year) & 365 (the number of days of the year)
so the final manual calculation for the second case like that
(Salary * 1 * 3) + (Salary * 2 * ((2) + (8/12) + (18/365))
----------------------------------------------------------------
** The first case using excel
Code:
=ROUND(C3*1*((C4)+(C5/12)+(C6/365)),2)
** The second case using excel
Code:
=ROUND((E3*1*3)+(E3*2*((E4-3)+(E5/12)+(E6/365))),2)
I need one formula that achieve that task
Thanks advanced for help
Attachments
Last edited: