+ Reply to Thread
Results 1 to 2 of 2

Query about a formula I'm working on

  1. #1
    Registered User
    Join Date
    02-06-2006
    Posts
    2

    Query about a formula I'm working on

    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

  2. #2
    Bernard Liengme
    Guest

    Re: Query about a formula I'm working on

    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
    --
    Bernard V Liengme
    www.stfx.ca/people/bliengme
    remove caps from email

    "Kuda" <[email protected]> wrote in message
    news:[email protected]...
    >
    > 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
    >
    >
    > --
    > Kuda
    > ------------------------------------------------------------------------
    > Kuda's Profile:
    > http://www.excelforum.com/member.php...o&userid=31242
    > View this thread: http://www.excelforum.com/showthread...hreadid=509166
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1