Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simple subtraction not working

Status
Not open for further replies.

Zonie32

Technical User
Jan 13, 2004
242
0
0
US
I have a ProviderFee, AncillaryFee and PEPMFee.

I want to take the ProviderFee minus AncillaryFee - PEPMFee and come up with a RetentionFee. It doesn't calculate correctly the way I have it.

=Sum([Providerfee]-[AncillaryFee]-[PEPMFee])

example: ProviderFee = 13.00, Ancillary = 5.10, PEPMFee = 4.00. the total Retention should be 3.90, however it is coming up as 11.70?? What is wrong with my formula?
 
Try either this:
=Sum([Providerfee])-Sum([AncillaryFee])-Sum([PEPMFee])
Or this:
=Sum(Nz([Providerfee],0)-Nz([AncillaryFee],0)-Nz([PEPMFee],0))


Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
You could also try:

=Sum([ProviderFee]-([AncillaryFee]+[PEPMFee]))

Use the Nz function if any of the fields could be Null

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top