+ Reply to Thread
Results 1 to 3 of 3

Thread: Rank ABS data with IF function

  1. #1
    Registered User
    Join Date
    06-17-2011
    Location
    Chicago, Illinois
    MS-Off Ver
    Excel 2007
    Posts
    1

    Rank ABS data with IF function

    I'm trying to create 1 formula from a combination of both B and C formulas. Currenly my worksheet uses 2 steps: 1.B 2.C...I only want 1.

    B:
    =IF(OR(B2<98,B2>100),14,1)+ABS(100-B2)
    C:
    =RANK(C2,C2:C15,1)

    Is there a formula that combines these?

    Please advise.


    A B C
    SCORE ABS RANK
    98.70 2.3 6
    98.94 2.06 4
    97.79 16.21 13
    99.50 1.50 3
    100.32 14.32 9
    98.84 2.16 5
    101.71 15.71 11
    101.05 15.05 10
    97.83 16.17 12
    103.47 17.47 14
    98.68 2.32 7
    99.99 1.01 2
    100.01 14.01 8
    100.00 1.00 1

    If score is < 98, but > 100, ADD 14
    If score is = to 98.00 thru 100, ADD 1
    Attached Files Attached Files

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    Apparently I can't say
    MS-Off Ver
    Apparently I can't say
    Posts
    8,274

    Re: Rank ABS data with IF function

    Personally, I'd stick with the intermediate column, but you could use:
    =SUMPRODUCT(--(N(IF($A$2:$A$15<98,14,IF($A$2:$A$15>100,14,1))+ABS(100-$A$2:$A$15))<(IF(A2<98,14,IF(A2>100,14,1))+ABS(100-A2))))+1
    array entered (with Ctrl+Shift+Enter).
    See attached.
    Attached Files Attached Files

  3. #3
    Forum Moderator daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2007
    Posts
    10,052

    Re: Rank ABS data with IF function

    You could use a non-"array-entered" version like this

    =SUMPRODUCT((ABS(100-$A$2:$A$15)-($A$2:$A$15>=98)*($A$2:$A$15<=100)*13<ABS(100-A2)-(A2>=98)*(A2<=100)*13)+0)+1
    Audere est facere

+ 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.2.0