# IF Formula Calculating Employee Benefits Packages

#### Justinian

##### Well-known Member
I need an formula to calculate employee vacation packages. The requirements are:

- 12 months of service = 40 hours vacation
- 24 months of service = 80 hours vacation
- 60 months of service = 120 hours vacation
- 180 months of service = 160 hours vacation
- 240 months of service = 200 hours vacation

I have the employees 2014 anniversary date but I cannot figure out how to sturcture my IF formula. So basically, if an employee was hired 1/8/06, I need the formula to spit out the appropriate vacation hour balance based on the chart above, which would be 120 hours because eight years of service falls between 60 months and 180 months.

Any ideas?

#### Justinian

##### Well-known Member
I mean this:

=IF(AND(X24>=X20+365*1,X24<X20+365*2),40,IF(AND(X24>=X20+365*2,X24<X20+365*5),80,IF(AND(X24>=X20+365*1,X24<X20+365*15),120,IF(AND(X24>=X20+365*1,X24<X20+365*20),160,IF(X24>=X20+365*20,200,"")))))

### Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a \$25,000 loan, 5% annual interest, 60 month loan.

#### Justinian

##### Well-known Member
Geez, it will not let me post the complete formula but it sounds like you already know what it is.

Last edited:

Replies
7
Views
2K
Replies
6
Views
2K
Replies
1
Views
587
Replies
1
Views
905
Replies
0
Views
944

1,172,013
Messages
5,878,732
Members
433,369
Latest member
Applewood

### 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?

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