use addition function

G

Guest

I have in my a format I need help on. I have an column called hours that I
enter hours charged. All my clients get 5 hour free, so I only want to charge
for the hours over 5. I found an example to do a sum =Sum([Hour]) total to
get the total hours because i visit there offices and enter maybe 1 here and
2 hours there during the month. How would I minus out 5 from the total and
then charge the remainer amount x 85. If I the amount is less than 5 hours I
want this field to show no charge, or 0.

(((Total) - 5) *85) ?
if field is >5, (no charge or 0)
 
W

Wayne Morgan

This should give you the value. If the result of the subtraction is >0, then
multiply by 85; otherwise, return 0.

=IIf(Total-5>0, (Total-5)*85, 0)
 
J

John Vinson

I have in my a format I need help on. I have an column called hours that I
enter hours charged. All my clients get 5 hour free, so I only want to charge
for the hours over 5. I found an example to do a sum =Sum([Hour]) total to
get the total hours because i visit there offices and enter maybe 1 here and
2 hours there during the month. How would I minus out 5 from the total and
then charge the remainer amount x 85. If I the amount is less than 5 hours I
want this field to show no charge, or 0.

(((Total) - 5) *85) ?
if field is >5, (no charge or 0)

=0.85 * IIF(Sum([hour]) > 5, Sum([Hour]) - 5, 0)

John W. Vinson[MVP]
 

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

Similar Threads

Access 2003 2
Cordless drill recommendation 5
The Razer Phone 6
Problem with Query Calculation 2
Fairly new to databases 4
updating calculated fields 1
Excel Sumproduct 0
Decimal 8

Top