formula for totaling

H

He cries for help

I have created thiis formula " =[PRICE1]+[PRICE2]+[PRICE3]+[PRICE4]+[PRICE5]
" to total the value of the five fields named above, I have to enter data in
all five fieldsfor it to work. How can I get it to total when i only have to
use a partial number of the fields?
 
A

Al Campagna

Use the NZ function...
=NZ([PRICE1])+NZ([PRICE2])+NZ([PRICE3])+NZ([PRICE4])+NZ([PRICE5])
If any element of the calculation is Null... NZ will (by default) substitute
a 0 in it's place.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 

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

Top