• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Excel gurus - time to help this amatuer!!!

Seven

New Member
Greetings from England,

I would be grateful if some of you Excel gurus can give me a hand.

Basically, I have to calculate temp staff bonus’ and the monthly salary they have worked.

So, basically i have an excel spreadsheet split in the number of months in the year 1 – 12.


I have a column in front of it.. indicating how many months someone has worked. As soon as i type 5, it will automatically enter the monthly salary for months 1 – 5, and in month six, pick up the formula from column R (for example)

simple - =IF(D4<=$C5,$B5,$R5)

D = period, C= number of months, B = fixed salary and R = bonus.


however, these are temporary contracts and the spreadsheet continues to pick up data in period 7 till the end of the year, which is wrong because the employee would have left.

However, if i drag this formula along, all the months from month 6 onwards would include the bonus, and once the bonus has been recognised i need that to be zero!!

This has too many arguments


=IF(D4<=$C5,$B5,$R5, if(D5=$R5,””,”error”))


But basically, all i am after is to make sure that once we have paid the bonus in period 6 for example, then period 7 to 12 will be 0. But the formula that i have already doesn’t allow me to do that!!

Please help if any of this makes sense to you,

If you do send through a macro, would be grateful if you explain how i would put that macro in!

thank you so much for your help!
 
Try this:

=IF(D4<=$C5,$B5,if(D5=$R5,””,”error”),$R5,)


If it doesn't work, i'm gonna have to agree with Mr. Zoogle we need an example. Seems like an easy problem just need an example.
 
@Montrey

Hi!

Am I wrong or the IF statement has 4 parts instead of the normal 3?

- test condition: D4<=$C5

- value if true: $B5

- value if false: if(D5=$R5,””,”error”) (normal IF)

- fourth part: $R5

- even a fifth part: ,

Regards!
 
Yes, the last :, should be deleted.


I just took his original If statement and tweaked it to the correct syntax.


But other than that. it should work!
 
Back
Top