+ Reply to Thread
Results 1 to 3 of 3

Apply RANK formula to dynamic table

  1. #1
    Registered User
    Join Date
    03-28-2007
    Posts
    6

    Apply RANK formula to dynamic table

    Hello,

    I am completly stuck trying to calculate the rank for a dynamic table (i.e. varying in size).

    I have a table like this (generated by a macro)

    SampleName-------¦Rating
    Sample 1----------¦5.516666667
    Sample 2----------¦5.320833333
    Sample 3----------¦5.285416667
    Sample 4----------¦3.985416667

    I have so far defined an offset for the ratings, allowing for n Samples.

    I now need a macro or something to calculate the ranking of the rating column whatever its size... and even better if it would extend to several columns... that would be great...

    resulting in something like this

    Sample------------¦Rating----------------¦Ranking
    Sample 1----------¦5.516666667----------¦4
    Sample 2----------¦5.320833333----------¦3
    Sample 3----------¦5.285416667----------¦2
    Sample 4----------¦3.985416667----------¦1

    Thanks so much for your help!
    Last edited by saabman; 09-18-2007 at 09:06 AM.

  2. #2
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127
    Setup a Dynamic Named range. Then apply the rank based on the named range.

    For example, if your data is in column B, with B1 being the heading, I would make a range with this reference formula:

    =OFFSET($B$1,1,0,COUNTA($B:B)-1,1)

    For this example, I would name that range Rank_Range. Now, in column C, I could enter this formula:

    =RANK(B2,RANK_RANGE) and copy that formula down as far as necessary.

    Let me know if that helps.

  3. #3
    Registered User
    Join Date
    03-28-2007
    Posts
    6
    Hi BigBas,

    Thanx for your suggestion, it works well, I wonder just how it would be possible to automaticaly extend the formula according to the size of the original table?

    Thanx again

+ 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