+ Reply to Thread
Results 1 to 3 of 3

plus or minus

  1. #1
    Registered User
    Join Date
    08-06-2006
    Posts
    36

    plus or minus

    I'm trying to get an IF function(with embeds) to use plus or minus a certain value. Excel only ends up plusing if true and does not minus if that is the case.

    Here is my function:
    =IF($AP$2=AP5,2,(IF($AP$2=AP5+-1,1.75,(IF($AP$2=AP5+-2,1.5,(IF($AP$2=AP5+-3,1.25,(IF($AP$2=AP5+-4,1,(IF($AP$2=AP5+-5,0.75,(IF($AP$2=AP5+-6,0.5,(IF($AP$2=AP5+-7,0.25,0)))))))))))))))

    Is there a way to insert the plus/minus symbol in the function or is there another way to do it? Excel seems to tell me to have it this way but doesn't end up minusing if that is the case.

    Thank you for any help!

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by Bullfn33
    I'm trying to get an IF function(with embeds) to use plus or minus a certain value. Excel only ends up plusing if true and does not minus if that is the case.

    Here is my function:
    =IF($AP$2=AP5,2,(IF($AP$2=AP5+-1,1.75,(IF($AP$2=AP5+-2,1.5,(IF($AP$2=AP5+-3,1.25,(IF($AP$2=AP5+-4,1,(IF($AP$2=AP5+-5,0.75,(IF($AP$2=AP5+-6,0.5,(IF($AP$2=AP5+-7,0.25,0)))))))))))))))

    Is there a way to insert the plus/minus symbol in the function or is there another way to do it? Excel seems to tell me to have it this way but doesn't end up minusing if that is the case.

    Thank you for any help!
    The formula would work as:"

    =IF($AP$2=AP5,2,(IF(or($AP$2=AP5+1,$AP$2=AP5-1),1.75,(IF(or($AP$2=AP5+2,$AP$2=AP5-2),1.5,(IF(or($AP$2=AP5+3,$AP$2=AP5-3),1.25,(IF(or($AP$2=AP5+4,$AP$2=AP5-4),1,(IF(or($AP$2=AP5+5,$AP$2=AP5-5),0.75,(IF(or($AP$2=AP5+6,$AP$2=AP5-6),0.5,(IF(or($AP$2=AP5+7,$AP$2=AP5-7),0.25,0)))))))))))))))

    except for the '7 level' limit, which means the formula becomes:

    =IF($AP$2=AP5,2,(IF(OR($AP$2=AP5+1,$AP$2=AP5-1),1.75,(IF(OR($AP$2=AP5+2,$AP$2=AP5-2),1.5,(IF(OR($AP$2=AP5+3,$AP$2=AP5-3),1.25,(IF(OR($AP$2=AP5+4,$AP$2=AP5-4),1,(IF(OR($AP$2=AP5+5,$AP$2=AP5-5),0.75,(IF(OR($AP$2=AP5+6,$AP$2=AP5-6),0.5,A2)))))))))))))

    and continues in A2 as:

    =IF(OR($AP$2=AP5+6,$AP$2=AP5-6),0.5,(IF(OR($AP$2=AP5+7,$AP$2=AP5-7),0.25,0)))


    note, If AP5 and AP2 are both blank, then 2 is allocated.

    Hope this helps
    ---

  3. #3
    Registered User
    Join Date
    08-06-2006
    Posts
    36
    Hey, I got it to do what I needed. Thank you so much for the help!

+ 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