Formula Help

AussieRob

Board Regular
Joined
Dec 8, 2004
Messages
207
I am having a bit of trouble with this formula, any ideas would be greatly appreciated.

Expr1: Sum(IIf([year]<2010,[so2_cost]/(610-17*([year]-2004))) Or (IIf(([year]<2019 And [year]>2009),[so2_cost]/(1126+90*([year]-2010)))))

The 'if' before the 'or' works fine, but when I add the second bit it just gives me -1 for everything which is not correct.

Thanks for your help on this one.

Rob
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Rob

What is the formula actually meant to do?
 
Upvote 0
I know the cost associated with 1 ton of SOx emissions and I know total emissions costs, but I don't actually know the quantitiy of the emissions (which is the goal).

Now in the period 2004 to 2010 the price falls from $610/t to $525/t, and given that this is a rough working model, I assume that the fall is constant at $17 per year. So we can do the calculation:

total cost / cost per unit

which should back out the number of units.

In the second section I am trying to do a similar thing but for the period 2010 to 2018 and with difference price assumptions.

Does that make sense?
 
Upvote 0
Hullo. Try this:
Code:
Expr1: Sum(IIf([year]<2010,[so2_cost]/(610-17*([year]-2004)), IIf(([year]<2019 And [year]>2009),[so2_cost]/(1126+90*([year]-2010)))))

Not sure about the paren matches, but this should get you close.
HTH (y)
P
 
Upvote 0

Forum statistics

Threads
1,221,875
Messages
6,162,563
Members
451,775
Latest member
Aiden Jenner

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