order of operations problem

dbh139

New Member
Joined
Jan 26, 2003
Messages
33
I am making calculations in a query and have this:

Overhead Total Cost: IIf([Contractor Table]![Contractor] In ("Alliance"),([Overhead]+[Overhead Markup])*[Material Quantity],0)

When I take out the paranthesis around

[Overhead]+[Overhead Markup]

it works, however the calculation isn't correct. When I keep it the way it is I get a continual error. Do I need to change the order? I have tried parantheses everywhere, but can't seem to get the calculation to work out correct
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Hullo. Try this UNTESTED modification to your query:
Code:
Overhead Total Cost: Iif([Contractor Table]![Contractor] In ("Alliance"),(([Overhead]+[Overhead Markup])*[Material Quantity]),0)

That should do the trick.

HTH

P
 
Upvote 0
That is the first formula i tried. It still produces #error. I have no idea, because the formula you suggested should work. Do you have any other ideas?
 
Upvote 0

Forum statistics

Threads
1,221,526
Messages
6,160,341
Members
451,638
Latest member
MyFlower

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top