+ Reply to Thread
Results 1 to 4 of 4

Rank function using "array IF" formula as ref doesn't seem to work

  1. #1
    Forum Contributor
    Join Date
    03-04-2013
    Location
    Europe
    MS-Off Ver
    Office 365 ProPlus
    Posts
    147

    Rank function using "array IF" formula as ref doesn't seem to work

    Hi,

    Please see my example workbook
    Rank example workbook.xlsx
    I'm trying to rank a city's score based on the scores of global cities and the european cities from within the same table. For the european ranking I've done a column with "European city?" yes/no so I thought I could use
    "{=RANK(D$10;IF($C$4:$C$33="Yes";D$4:D$33))}" (see cell D3)
    But that gives a #VALUE error since RANK() doesn't seem to be able to handle the "FALSE" output from the boolean array created by the IF formula.
    Is there anyway of sorting this out? Or do I have to make a separate table with only European cities for this to work?

    Thanks for your help!

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Rank function using "array IF" formula as ref doesn't seem to work

    Hi.

    Your analysis of the RANK function is correct.

    One possible workaround would be an array formula** using MATCH and LARGE:

    =MATCH(D$10,LARGE(IF($C$4:$C$33="Yes",D$4:D$33),ROW(INDIRECT("1:"&COUNTIF($C$4:$C$33,"Yes")))),0)

    Regards


    **Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Forum Contributor
    Join Date
    03-04-2013
    Location
    Europe
    MS-Off Ver
    Office 365 ProPlus
    Posts
    147

    Re: Rank function using "array IF" formula as ref doesn't seem to work

    Thanks XOR LX,

    I figured out two other ways that I like even more:
    (array formula)
    Please Login or Register  to view this content.
    and

    (not array formula)
    Please Login or Register  to view this content.

  4. #4
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Rank function using "array IF" formula as ref doesn't seem to work

    Ah, yes. Much better than my offering.

    Glad someone's thinking!

    Cheers

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] "Find" doesn't work when cell has formula in it
    By Xx7 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-01-2014, 10:19 PM
  2. "IF" Formula Doesn't seem to work.
    By fearonc in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-17-2013, 01:36 PM
  3. Open files from FTP server (works with "servername" but doesn't work with "ip address")
    By adammsu1983 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-24-2012, 04:30 PM
  4. vba doesn't work with "iferror()" and formula autofill problem
    By lkim in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-10-2012, 07:47 AM
  5. [SOLVED] =SUMIF(A2:A34,"=F37",E2:E34) Why doesn't this formula work
    By Jonas in forum Excel General
    Replies: 2
    Last Post: 06-09-2006, 10:20 PM

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