ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Ifs (https://www.excelbanter.com/excel-worksheet-functions/237125-ifs.html)

myname

Ifs
 
Dear group,
I'm trying to calculate the attendance allowance as follows:
1) if accumulated 2 or more days of sick leave from beginning of year to
last month,

a) and current month has 0 days sick leave, attendance allowance (AA)
for current month = 50
2) if current month has 1 day sick leave, AA = 25
3) if current month has 2 or more days of sick leave AA= 0

2) if accumulated sick leave from beginning of year to current month
does not exceed 2 days, then current month AA = $50.


staff name acc to last mth current mth AA
a 2 days 1 day $25
b 2 days 2 days $0
c 1 day 1 days $50
d 1 day 2 days $25
e 0 days 1 day $50
f 0 days 2 days $50
g 0 days 3 days $25
h 0 days 4 days $0
i 2 days 0 days $50
j 1 day 0 days $50

thanks
jl

Sam Wilson

Ifs
 
If cell A1 was the title "Staff name", B1 was "Acc to last month" etc... put
this in cell D1

=if(B11,if(C1=0,50,if(C1=1,25,0)),50)

"myname" wrote:

Dear group,
I'm trying to calculate the attendance allowance as follows:
1) if accumulated 2 or more days of sick leave from beginning of year to
last month,

a) and current month has 0 days sick leave, attendance allowance (AA)
for current month = 50
2) if current month has 1 day sick leave, AA = 25
3) if current month has 2 or more days of sick leave AA= 0

2) if accumulated sick leave from beginning of year to current month
does not exceed 2 days, then current month AA = $50.


staff name acc to last mth current mth AA
a 2 days 1 day $25
b 2 days 2 days $0
c 1 day 1 days $50
d 1 day 2 days $25
e 0 days 1 day $50
f 0 days 2 days $50
g 0 days 3 days $25
h 0 days 4 days $0
i 2 days 0 days $50
j 1 day 0 days $50

thanks
jl


myname

Ifs
 

Thanks, that worked.

Sam Wilson wrote:
If cell A1 was the title "Staff name", B1 was "Acc to last month" etc... put
this in cell D1

=if(B11,if(C1=0,50,if(C1=1,25,0)),50)

"myname" wrote:

Dear group,
I'm trying to calculate the attendance allowance as follows:
1) if accumulated 2 or more days of sick leave from beginning of year to
last month,

a) and current month has 0 days sick leave, attendance allowance (AA)
for current month = 50
2) if current month has 1 day sick leave, AA = 25
3) if current month has 2 or more days of sick leave AA= 0

2) if accumulated sick leave from beginning of year to current month
does not exceed 2 days, then current month AA = $50.


staff name acc to last mth current mth AA
a 2 days 1 day $25
b 2 days 2 days $0
c 1 day 1 days $50
d 1 day 2 days $25
e 0 days 1 day $50
f 0 days 2 days $50
g 0 days 3 days $25
h 0 days 4 days $0
i 2 days 0 days $50
j 1 day 0 days $50

thanks
jl



All times are GMT +1. The time now is 04:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com