nested if statement

RedOctoberKnight

Board Regular
Joined
Nov 16, 2015
Messages
150
Office Version
  1. 2016
Platform
  1. Windows
Good Morning,

Probably pretty easy for you guys.

Looking to do a nested if statement for a vacation accrual calculator.

Basically I have a hire date in B1. In C1 in want to do a nested if statement with the following parameters.

if B1 is less than 1 year from date in A1 (first day of calendar year) then 0 days
if B1 is from 1 year to 5 years, then 10 days
if B1 is from 6 years to 10 years, then 15 days
if B1 is from 11 years to 17 years, 20 days
if B1 is greater than 18 years from date in A1, then 25 days.
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Try this:
Code:
=IF(INT(YEARFRAC(A1,B1))>=18,25,IF(INT(YEARFRAC(A1,B1))>=11,20,IF(INT(YEARFRAC(A1,B1))>=6,15,IF(INT(YEARFRAC(A1,B1))>=1,10,0))))
 
Upvote 0

Forum statistics

Threads
1,216,091
Messages
6,128,775
Members
449,468
Latest member
AGreen17

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