#1   Report Post  
Posted to microsoft.public.excel.misc
ben simpson
 
Posts: n/a
Default Combining formulas

I've been trying to combine the following two formulas with no luck.

=IF(AND(E25<DATE(YEAR(1989),7,1),R41+S41-T41200),200,R41+S41-T41)
and
=IF(AND(E25DATE(YEAR(1989),7,1),R41+S41-T41120),120,R41+S41-T41)

What I need is a formula that says IF E25(a hiring date) was before July
1,1989, a maxium of 200 can be placed in the cell, but, if E25 was after July
1,1989 only a maxium can be placed in the cell, if the maxiums have not been
reached, then R41+S41-T41.

I've tried this several ways, but every time I do, and when I test different
hiring dates, i keep getting the wrong results. Thanks for looking at this
one, in advance....Ben
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Combining formulas

If you put =year(1989) in a cell, you'll see that you don't get 1989 back.
Excel sees that 1989 as the number of days from a base date (Dec 31, 1899 for
most wintel users).

So you'll see 1905 returned (1989 days past 12/31/1899).

So maybe just removing those year()'s would fix it:

=IF(AND(E25<DATE(1989,7,1),R41+S41-T41200),200,R41+S41-T41)


ben simpson wrote:

I've been trying to combine the following two formulas with no luck.

=IF(AND(E25<DATE(YEAR(1989),7,1),R41+S41-T41200),200,R41+S41-T41)
and
=IF(AND(E25DATE(YEAR(1989),7,1),R41+S41-T41120),120,R41+S41-T41)

What I need is a formula that says IF E25(a hiring date) was before July
1,1989, a maxium of 200 can be placed in the cell, but, if E25 was after July
1,1989 only a maxium can be placed in the cell, if the maxiums have not been
reached, then R41+S41-T41.

I've tried this several ways, but every time I do, and when I test different
hiring dates, i keep getting the wrong results. Thanks for looking at this
one, in advance....Ben


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
ben simpson
 
Posts: n/a
Default Combining formulas

Thanks Dave. Didn't even catch it. I modified it and it works great.
Thanks again....Ben

"Dave Peterson" wrote:

If you put =year(1989) in a cell, you'll see that you don't get 1989 back.
Excel sees that 1989 as the number of days from a base date (Dec 31, 1899 for
most wintel users).

So you'll see 1905 returned (1989 days past 12/31/1899).

So maybe just removing those year()'s would fix it:

=IF(AND(E25<DATE(1989,7,1),R41+S41-T41200),200,R41+S41-T41)


ben simpson wrote:

I've been trying to combine the following two formulas with no luck.

=IF(AND(E25<DATE(YEAR(1989),7,1),R41+S41-T41200),200,R41+S41-T41)
and
=IF(AND(E25DATE(YEAR(1989),7,1),R41+S41-T41120),120,R41+S41-T41)

What I need is a formula that says IF E25(a hiring date) was before July
1,1989, a maxium of 200 can be placed in the cell, but, if E25 was after July
1,1989 only a maxium can be placed in the cell, if the maxiums have not been
reached, then R41+S41-T41.

I've tried this several ways, but every time I do, and when I test different
hiring dates, i keep getting the wrong results. Thanks for looking at this
one, in advance....Ben


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.misc
Claire
 
Posts: n/a
Default Combining formulas

WHAT YOU NEED TO DO IS FIRST ADD A NEW COLUMN TO YOUR SPREADSHEET THAT
CALCULATES THE R41+S41-T41 AS FOLLOWS:-

=IF(R41+S41-T41200,200,R41+S41-T41) WE WILL CALL THIS NEW CELL F1

NOW REVISE YOUR FORMULA TO THE FOLLOWING:-

=IF(E25<DATE(1998,6,30),IF(E25DATE(1998,1,7),200) ,F1)

THIS SHOULD WORK

CLAIRE

"ben simpson" wrote:

I've been trying to combine the following two formulas with no luck.

=IF(AND(E25<DATE(YEAR(1989),7,1),R41+S41-T41200),200,R41+S41-T41)
and
=IF(AND(E25DATE(YEAR(1989),7,1),R41+S41-T41120),120,R41+S41-T41)

What I need is a formula that says IF E25(a hiring date) was before July
1,1989, a maxium of 200 can be placed in the cell, but, if E25 was after July
1,1989 only a maxium can be placed in the cell, if the maxiums have not been
reached, then R41+S41-T41.

I've tried this several ways, but every time I do, and when I test different
hiring dates, i keep getting the wrong results. Thanks for looking at this
one, in advance....Ben

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
Combining formulas jezzica85 Excel Discussion (Misc queries) 5 March 3rd 06 06:56 AM
Combining 2 Formulas carl Excel Worksheet Functions 2 February 2nd 06 06:21 PM
Combining two formulas Redsmartie Excel Worksheet Functions 2 April 7th 05 09:52 AM
Combining formulas and results HELP!! JRH New Users to Excel 4 January 22nd 05 05:26 PM
combining countif formulas Liz G Excel Worksheet Functions 3 November 1st 04 09:34 PM


All times are GMT +1. The time now is 11:01 PM.

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

About Us

"It's about Microsoft Excel"