Excel formula for leaves

komalbatraa

New Member
Joined
Jun 16, 2011
Messages
3
Please help me with the excel formula for below mentioned problem:-

I have made an excel sheet in which i have a column of late reporting in office
i want to cal late reporting in another column if
-there are 3 late reporting then half day will be counted
-for 4th 5th and 6th late reporting in a month one leave and a half day will be counted.
-for 7th 8th and 9th late reporting two and a half day will be counted
and so on
(3 days slab, +1 will be counted)

all this leaves will be deducted from the number of days present.
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
=if(l17<3,0,0)=if(l17=3,0.5,0)=if(and(l17>=4,l17<=6),1.5,0)=if(and(l17>=7,l17<=9),2.5,0)=if(and(l17>=10,l17<=12),3.5,0)=if(and(l17>=13,l17<=15),4.5,0)

plz guide this formula is not working
its returning me "false"
i want it to return value
 
Upvote 0
You can not nest IF in this way- putting the quals sign after whole function.
If you need more that one IF the false statment of the formula should be the first part of the IF.
Try this:
=IF(L17<3,0,IF(L17=3,0.5,IF(AND(L17>=4,L17<=6),1.5,IF(AND(L17>=7,L17<=9),2.5,IF(AND(L17>=10,L17<=12),3.5,IF(AND(L17>=13,L17<=15),4.5,0))))))
 
Upvote 0
Komal,
You will have to consider many if cases which may prove unwieldy to edit. Instead try this simpler formula:
Code:
=IF(L17>=3,CEILING(L17/3,1)-0.5,0)
 
Upvote 0
Thankyou sir :)

You can not nest IF in this way- putting the quals sign after whole function.
If you need more that one IF the false statment of the formula should be the first part of the IF.
Try this:
=IF(L17<3,0,IF(L17=3,0.5,IF(AND(L17>=4,L17<=6),1.5,IF(AND(L17>=7,L17<=9),2.5,IF(AND(L17>=10,L17<=12),3.5,IF(AND(L17>=13,L17<=15),4.5,0))))))
 
Upvote 0

Forum statistics

Threads
1,224,559
Messages
6,179,513
Members
452,921
Latest member
BBQKING

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