Query about a formula I'm working on

K

Kuda

I was wondering if it is possible to make this query less longwinded?

=(IF(D17>0,(((A1-C17)/(A1/D17))+C17))+IF(E17>0,((A1-(((A1-C17)/(A1/D17))+C17))/(A1/E17))))+IF(F17>0,(A1-(((A1-C17)/(A1/D17)+((A1-(((A1-C17)/(A1/D17))+C17))/(A1/E17)))+C17))/(A1/F17))


A1= max value
C17=base value
D17,E17,F17= variable value's

I've been working on the Value for a Calc for a game I've been playing
lately.
I'm using it to work out damage resistances but I feel the formula
could be streamlined but for the life of me my brain has gone blank.
Example:
A1=100
C17 = 60
for arguments sake lets say D17, E17 and F17 are all = 30
the formula would get the max percentage and work out what the boosts
would be for each variable based on the difference between the max
value and the base value.
The answer given by the formula above would for this would be 86.28

Does anyone know if there is a way to streamline the Formula? without
obviously using extra cells to store hidden values.

Rgds,
Kuda
 
B

Bernard Liengme

Two ideas:
1) Use Insert|Name and define myfactor as
=(Sheet1!$A$1-Sheet1!$C$17)/(Sheet1!$A$1/Sheet1!$D$17)+Sheet1!$C$17
This makes the formula
=(IF(D17>0,myfactor)+IF(E17>0,((A1-myfactor)/(A1/E17))))+IF(F17>0,(A1-((myfactor+((A1-myfactor)/(A1/E17)))))/(A1/F17))
2) Do away with IF's to make more readable
=(D17>0)*(myfactor+(E17>0)*((A1-(myfactor))/(A1/E17)))+(F17>0)*(A1-((myfactor+((A1-(myfactor))/(A1/E17)))))/(A1/F17)
best wishes
 

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