Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default IF formula question - nesting multiple functions.

Hello, I'm having trouble with writing a formula to calculate sick leave
payoff. If column A is hire date, column C is hour type (sick, vacation,
holiday), column C is hours of sick leave accrued, and column D is hourly
rate, I need to calculate: If the hire date is = 5 years, then sick leave
payout is 25% of accrued sick hours. I've got an IF function already for
=IF(G11="Sick Leave",(H11*0.25)*I11,0), but need to also include a function
to return the value if the date is greater than 5 years, and to return 0 if
the hire date is within 5 years. I appreciate any help!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,059
Default IF formula question - nesting multiple functions.

"kraymond" wrote:
I need to calculate: If the hire date is = 5 years, then sick leave
payout is 25% of accrued sick hours. I've got an IF function already for
=IF(G11="Sick Leave",(H11*0.25)*I11,0), but need to also include a
function to return the value if the date is greater than 5 years


One way:

=if(and(G11="sick leave",datedif(A1,today(),"y")=5), H11*I11*25%, 0)

But you might want to replace TODAY() with a reference to the cell that
contains the date of the calculation. That is usually not necessarily
"today"; instead it is a payroll date.

Note: You wrote G11, H11 and I11. I don't see those columns mention in
your design outline below. But I presume you can sort out the disparity.


----- original message -----

"kraymond" wrote in message
...
Hello, I'm having trouble with writing a formula to calculate sick leave
payoff. If column A is hire date, column C is hour type (sick, vacation,
holiday), column C is hours of sick leave accrued, and column D is hourly
rate, I need to calculate: If the hire date is = 5 years, then sick leave
payout is 25% of accrued sick hours. I've got an IF function already for
=IF(G11="Sick Leave",(H11*0.25)*I11,0), but need to also include a
function
to return the value if the date is greater than 5 years, and to return 0
if
the hire date is within 5 years. I appreciate any help!


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default IF formula question - nesting multiple functions.

Excellent, I appreciate the input, and I was able to get my formula to
calculate correctly. Thanks again!

"JoeU2004" wrote:

"kraymond" wrote:
I need to calculate: If the hire date is = 5 years, then sick leave
payout is 25% of accrued sick hours. I've got an IF function already for
=IF(G11="Sick Leave",(H11*0.25)*I11,0), but need to also include a
function to return the value if the date is greater than 5 years


One way:

=if(and(G11="sick leave",datedif(A1,today(),"y")=5), H11*I11*25%, 0)

But you might want to replace TODAY() with a reference to the cell that
contains the date of the calculation. That is usually not necessarily
"today"; instead it is a payroll date.

Note: You wrote G11, H11 and I11. I don't see those columns mention in
your design outline below. But I presume you can sort out the disparity.


----- original message -----

"kraymond" wrote in message
...
Hello, I'm having trouble with writing a formula to calculate sick leave
payoff. If column A is hire date, column C is hour type (sick, vacation,
holiday), column C is hours of sick leave accrued, and column D is hourly
rate, I need to calculate: If the hire date is = 5 years, then sick leave
payout is 25% of accrued sick hours. I've got an IF function already for
=IF(G11="Sick Leave",(H11*0.25)*I11,0), but need to also include a
function
to return the value if the date is greater than 5 years, and to return 0
if
the hire date is within 5 years. I appreciate any help!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
having problems with a multiple conditions nesting formula vt2wake2vt Excel Worksheet Functions 3 March 3rd 10 03:26 AM
formula error- ("Nesting more than 7 functions"- Feb4) Brian Excel Worksheet Functions 3 February 5th 09 11:33 PM
nesting more than 7 functions? Brian Excel Worksheet Functions 11 February 5th 09 11:02 PM
Nesting functions in the functions dialog box cs170a Excel Worksheet Functions 0 June 10th 05 10:36 PM
nesting more than 15 if functions in a formula HARSH BAHAL Excel Worksheet Functions 7 May 24th 05 10:53 AM


All times are GMT +1. The time now is 07:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"