Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Nested if formula

Need help with building nested if formula.
Have following columns: date of hire, date of separation, date of salary
increase, old pay, new pay, amount of increase, and months of the year.
Trying to build statement that would display monthly salary for months worked
(show blanks outside this range. For example if employee worked from march to
august, display salary for the same months. Outside this range show zero.
Also if in may emplyee got increase in july show old salary for march thru
june and for july thru august a new wage. Is this doable. Please help.
Jurek



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 132
Default Nested if formula

Jurek, this is easier to show in a workbook, but here's an explanation. Let
me know if you'd like the example.

C5: hire date
D5: separation date
E5: salary increase date
F5: old pay amount
G5: new pay amount
H5: amount of increase amount (not needed here)

J3-U3: date headers (1/1/06, 2/1/06, ... , 12/1/06)

J5-U5: put this formula in J5 and copy through U5:

=IF( AND( J$3$C5, J$3<$D5 ), IF( J$3=$E5, $G5, $F5 ), 0 )



"Jurek" wrote:

Need help with building nested if formula.
Have following columns: date of hire, date of separation, date of salary
increase, old pay, new pay, amount of increase, and months of the year.
Trying to build statement that would display monthly salary for months worked
(show blanks outside this range. For example if employee worked from march to
august, display salary for the same months. Outside this range show zero.
Also if in may emplyee got increase in july show old salary for march thru
june and for july thru august a new wage. Is this doable. Please help.
Jurek



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Nested if formula

Bill:
I have one more question. What is gt and lt in you formula?
Jurek

"Bill Pfister" wrote:

Jurek, this is easier to show in a workbook, but here's an explanation. Let
me know if you'd like the example.

C5: hire date
D5: separation date
E5: salary increase date
F5: old pay amount
G5: new pay amount
H5: amount of increase amount (not needed here)

J3-U3: date headers (1/1/06, 2/1/06, ... , 12/1/06)

J5-U5: put this formula in J5 and copy through U5:

=IF( AND( J$3$C5, J$3<$D5 ), IF( J$3=$E5, $G5, $F5 ), 0 )



"Jurek" wrote:

Need help with building nested if formula.
Have following columns: date of hire, date of separation, date of salary
increase, old pay, new pay, amount of increase, and months of the year.
Trying to build statement that would display monthly salary for months worked
(show blanks outside this range. For example if employee worked from march to
august, display salary for the same months. Outside this range show zero.
Also if in may emplyee got increase in july show old salary for march thru
june and for july thru august a new wage. Is this doable. Please help.
Jurek



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Nested if formula

The interface that you're using to read messages is showing the greater than and
less than symbols as gt and lt.

I use a plain text newsreader and Bill's message shows up very nice for me.

Jurek wrote:

Bill:
I have one more question. What is gt and lt in you formula?
Jurek

"Bill Pfister" wrote:

Jurek, this is easier to show in a workbook, but here's an explanation. Let
me know if you'd like the example.

C5: hire date
D5: separation date
E5: salary increase date
F5: old pay amount
G5: new pay amount
H5: amount of increase amount (not needed here)

J3-U3: date headers (1/1/06, 2/1/06, ... , 12/1/06)

J5-U5: put this formula in J5 and copy through U5:

=IF( AND( J$3$C5, J$3<$D5 ), IF( J$3=$E5, $G5, $F5 ), 0 )



"Jurek" wrote:

Need help with building nested if formula.
Have following columns: date of hire, date of separation, date of salary
increase, old pay, new pay, amount of increase, and months of the year.
Trying to build statement that would display monthly salary for months worked
(show blanks outside this range. For example if employee worked from march to
august, display salary for the same months. Outside this range show zero.
Also if in may emplyee got increase in july show old salary for march thru
june and for july thru august a new wage. Is this doable. Please help.
Jurek




--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Nested if formula

Bill:
Thanks. It works. I managed to solve the problem with a variation
=IF(HireDate=0,0,IF(SepDate<Jan,0,IF(Jan<HireDate, "",IF(IncDate=0,OldWage,IF(
JanIncDate,NewWage/12,OldWage/12))))).
But your formula is cleaner. I am dividing new and old salary by 12 to
display montlhy amounts.
The one caveat is that the separation date can not be an empy field. It has
to have some kind of data. Is there a way of displaying the results for null
data for separation. Because as is is now I have to "terminate" an employee
to get his/hers salary. If the formula could capture this data (salary) for
an active employee(no separation date) it would be great. Right now for
active employee I must project a termination date far into the future.
But thanks for your help and reply.
Jurek

"Jurek" wrote:

Need help with building nested if formula.
Have following columns: date of hire, date of separation, date of salary
increase, old pay, new pay, amount of increase, and months of the year.
Trying to build statement that would display monthly salary for months worked
(show blanks outside this range. For example if employee worked from march to
august, display salary for the same months. Outside this range show zero.
Also if in may emplyee got increase in july show old salary for march thru
june and for july thru august a new wage. Is this doable. Please help.
Jurek





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 132
Default Nested if formula

Sorry for the late reply; I've been traveling for the holidays.

The following formula will handle a lack of separation date. Let me know if
this doesn't cover what you need.

=IF( ISBLANK( $B5 ), 0, IF( ISBLANK( $C5 ), IF( I$3$B5, $E$5, 0 ), IF( AND(
I$3$B5, I$3<$C5 ), IF( I$3=$D5, $F5, $E5 ), 0 ) ) )

Bill


"Jurek" wrote:

Bill:
Thanks. It works. I managed to solve the problem with a variation
=IF(HireDate=0,0,IF(SepDate<Jan,0,IF(Jan<HireDate, "",IF(IncDate=0,OldWage,IF(
JanIncDate,NewWage/12,OldWage/12))))).
But your formula is cleaner. I am dividing new and old salary by 12 to
display montlhy amounts.
The one caveat is that the separation date can not be an empy field. It has
to have some kind of data. Is there a way of displaying the results for null
data for separation. Because as is is now I have to "terminate" an employee
to get his/hers salary. If the formula could capture this data (salary) for
an active employee(no separation date) it would be great. Right now for
active employee I must project a termination date far into the future.
But thanks for your help and reply.
Jurek

"Jurek" wrote:

Need help with building nested if formula.
Have following columns: date of hire, date of separation, date of salary
increase, old pay, new pay, amount of increase, and months of the year.
Trying to build statement that would display monthly salary for months worked
(show blanks outside this range. For example if employee worked from march to
august, display salary for the same months. Outside this range show zero.
Also if in may emplyee got increase in july show old salary for march thru
june and for july thru august a new wage. Is this doable. Please help.
Jurek



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Nested if formula

Thanks Bill
Jurek

"Jurek" wrote:

Need help with building nested if formula.
Have following columns: date of hire, date of separation, date of salary
increase, old pay, new pay, amount of increase, and months of the year.
Trying to build statement that would display monthly salary for months worked
(show blanks outside this range. For example if employee worked from march to
august, display salary for the same months. Outside this range show zero.
Also if in may emplyee got increase in july show old salary for march thru
june and for july thru august a new wage. Is this doable. Please help.
Jurek



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
Nested If Formula Don Guillett[_2_] Excel Discussion (Misc queries) 0 April 6th 10 02:51 PM
Nested Formula Betty K Excel Worksheet Functions 2 March 8th 09 12:28 AM
Nested IF and AND formula carrie08 New Users to Excel 3 July 19th 08 02:58 AM
Nested Formula Jeannette Excel Worksheet Functions 3 November 17th 04 07:04 PM
Nested if /and formula Neeko Excel Programming 2 January 16th 04 08:08 PM


All times are GMT +1. The time now is 12:18 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"