formula help please

  • Thread starter Thread starter goss
  • Start date Start date
G

goss

Hi ng
Using xl 2003

It's late. I've looked at this for an hr, can't figure out what I'
doing wrong

=IF(I2>40,(ROUND(((D2*1.5)*(I2-40))+(40*D2))),ROUND(D2*I2)
 
Hi Goss!

I'm not certain as to what part you want to round in the TRUE return,
but in both cases you have missed out the number of digits you want to
round to. ROUND's second argument does not have a default value of 0
digits.

The following works:

=IF(I2>40,ROUND(((D2*1.5)*(I2-40))+(40*D2),0),ROUND(D2*I2,0))

But check that it rounds correctly for TRUE and change the 0 to
whatever you are wanting in terms of number of digits.
 
Assuming you are trying to get an amount for regular and OT you can use

=ROUND(MIN(I2,40)*D2+MAX(I2-40,0)*1.5*D2,2)

rounded to the nearest penny, it will do what Norman's formula does if you
change it to

=IF(I2>40,ROUND(((D2*1.5)*(I2-40))+(40*D2),2),ROUND(D2*I2,2))

--
Regards,

Peo Sjoblom

(No private emails please, for everyone's
benefit keep the discussion in the newsgroup/forum)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top