IIF Expression with Multiple Condition

mba_110

Board Regular
Joined
Nov 28, 2012
Messages
72
Office Version
  1. 365
Platform
  1. Windows
Dear All,


Please i need following expression in correct format i manage to come near by the correct result but unable to succeed.

Here is Access 2010 Expression.
IIf([Total_Days]<=1826,[Total_Days]*15/365,IIf([Total_Days]>1826,[Total_Days]*30/365,"Invalid Input"))

I am trying to calculate benefit days for employee the method is if total days is lesser than 1826 days than it should calculate 15 days per 365 days. and second expression is if total days is greater than 1826 days than first he has to calculate 15 days till 1826 days and after 30 days per 365 days whatever days is exceeding from 1826 Days at the end total should be added as per 15 Days & 30 Days calculation.

for example

Total Days is 3,652 Days

1. it should be 1826x15 Days per 365 is = 75
2. afterwords what ever is more than 1826-3652 is 1826 x 30 Days per 365 = 150 Days
So total should show me 225 Days for per 3,652 Days

If the total is less than 1826 days than it should show the total days X 15 / 365.

Thanks & regards,

MBA
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Hello, This would be one way:

=IF(Total_Days>1826,75+(Total_Days-1826)*30/365,Total_Days*15/365)
 
Upvote 0
Thank you very much its working with my database thanks.
 
Upvote 0

Forum statistics

Threads
1,215,463
Messages
6,124,965
Members
449,201
Latest member
Jamil ahmed

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