Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default Using "IF" with "AND"and "OR" function

A company has both full time and part time employees and fulltime employees
recieve 5 days family leave if they have been employed for 1 year or more,
oterwise they get 3 days. Part time employees recieve 3 days if employed 2
years or more. How can I construct a single formula incorporating both full
time and part time employees?
--
Frustrated
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,726
Default Using "IF" with "AND"and "OR" function

=IF(status="Full Time",IF(years_employed=1,5,3),IF(years_employed =2,3,0))

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Richard Freist" wrote in message
...
A company has both full time and part time employees and fulltime employees
recieve 5 days family leave if they have been employed for 1 year or more,
oterwise they get 3 days. Part time employees recieve 3 days if employed 2
years or more. How can I construct a single formula incorporating both
full
time and part time employees?
--
Frustrated



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Using "IF" with "AND"and "OR" function

If A1 has either ft or pt and B1 has employment years, then:

=(A1="ft")*((B1=1)*5 + (B1<1)*3)+(A1="pt")*(B1=2)*3
notice that no
IFs
ANDs
ORs
were necessary
--
Gary's Student
gsnu200703


"Richard Freist" wrote:

A company has both full time and part time employees and fulltime employees
recieve 5 days family leave if they have been employed for 1 year or more,
oterwise they get 3 days. Part time employees recieve 3 days if employed 2
years or more. How can I construct a single formula incorporating both full
time and part time employees?
--
Frustrated

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 611
Default Using "IF" with "AND"and "OR" function

Gary's Student,

Yeah. Now if we only had a BUT() function.
--
Earl Kiosterud
www.smokeylake.com
-----------------------------------------------------------------------
"Gary''s Student" wrote in message
...
If A1 has either ft or pt and B1 has employment years, then:

=(A1="ft")*((B1=1)*5 + (B1<1)*3)+(A1="pt")*(B1=2)*3
notice that no
IFs
ANDs
ORs
were necessary
--
Gary's Student
gsnu200703


"Richard Freist" wrote:

A company has both full time and part time employees and fulltime employees
recieve 5 days family leave if they have been employed for 1 year or more,
oterwise they get 3 days. Part time employees recieve 3 days if employed 2
years or more. How can I construct a single formula incorporating both full
time and part time employees?
--
Frustrated



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,726
Default Using "IF" with "AND"and "OR" function

But for a guy who asked for a solution to a simpe problem, this provides an
overly complex answer.



"Gary''s Student" wrote in message
...
If A1 has either ft or pt and B1 has employment years, then:

=(A1="ft")*((B1=1)*5 + (B1<1)*3)+(A1="pt")*(B1=2)*3
notice that no
IFs
ANDs
ORs
were necessary
--
Gary's Student
gsnu200703


"Richard Freist" wrote:

A company has both full time and part time employees and fulltime
employees
recieve 5 days family leave if they have been employed for 1 year or
more,
oterwise they get 3 days. Part time employees recieve 3 days if employed
2
years or more. How can I construct a single formula incorporating both
full
time and part time employees?
--
Frustrated





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
Need some comments on my Utility_Move class module. jchen Excel Worksheet Functions 0 August 21st 06 07:05 PM
numerical integration integreat Excel Discussion (Misc queries) 4 May 12th 06 02:40 AM
Custom functions calculating time arguments Help Desperate Bill_De Excel Worksheet Functions 12 April 25th 06 02:22 AM
Wild Characters in "IF" function jakar Excel Discussion (Misc queries) 3 November 17th 05 05:35 PM
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 AM


All times are GMT +1. The time now is 12:12 AM.

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"