PDA

View Full Version : Department Formulas for Cost



aretap
2008-01-24, 09:52 PM
Is there anyway to add a parameter that will calculate a cost depending on the department of a room

For instance I have set up room in a project with a "Department Cost" (Number) and a second parameter " Department Number" Number. What I would like is to assign the Department Number Field in a Schedule a number (i.e. 1,2,3) Then the Department Cost Parameter would out put a number in the schedule based on that Department Number. The formula I am using is
=IF (Department Number = 1, "300")

What happens in that in the Department Cost Filled it just shows the formula I typed in. What am I doing wrong?? Is this even possible??

Thanks

jtobin.68416
2008-01-24, 10:22 PM
I don't use formulas much, but isn't there supposed to be a 'base' value and an 'else' value?

As in (IF 'This'=That, then Base, otherwise Else).

John Tobin

Dwane Lindsey
2008-01-25, 02:46 AM
The formula you are looking for looks something like this...
if(Dept Numb = 1, 300, if(Dept Numb = 2, 400, if(Dept Numb = 3, 500, 0))).
The 0 is in there for Dept Numb's that do not equal any of the numbers listed after the equal sign. You'll have to keep adding... if(Dept Numb = #, #, ...until you get all the Dept Numb listed. Then, you finish it off with 0 and then add the correct number of ) to close off the formula.

aretap
2008-01-25, 04:58 AM
Does anyone know how many times you can nest this "if-else" statment!?!?!?

Steve_Stafford
2008-01-25, 05:18 AM
"Murphy's Law" dictates that it will be one less than you actually need... :sad:

I'm thinking that a Schedule Key might be more effective. I'll see if I can find an example or make one later on tonight.

iru69
2008-01-25, 06:17 AM
dpatera wasn't real specific on what the overall goal was, but I think Steve is on the right track... it's a lot less fuss. I took the liberty of posting an extremely simple example of what I think he was suggesting.

Steve_Stafford
2008-01-25, 06:34 AM
Well...here's another that I dug out and upgraded...and an image.

aretap
2008-01-25, 03:56 PM
Thanks for the Help!!!:)