+ Reply to Thread
Results 1 to 1 of 1

PercentRank Macro

  1. #1
    Registered User
    Join Date
    11-09-2011
    Location
    Central, Hong Kong
    MS-Off Ver
    Excel 2010
    Posts
    49

    PercentRank Macro

    Hi guys,
    I've been working on a project and have hit a little bit of a brick wall. I have many problems at the moment, but the following is the most important thing I have to deal with.

    If someone can do this I'll be amazed as I've asked so many people and no one has any idea how to go about completing this.

    I'm performing a percentrank on 400 odd stocks. All it entails is I need a percentrank for values U8, U208, U408, .... ,U(8+200n) Where n = 0,1,2...... all the way to 400
    ie PERCENTRANK = (U8:U(8+200n) , U8) and I want to do this for other values which match this criteria so (U8:U(8+200n) , U208) etc up until (U8 : U(8+200n), U(8+200n))

    -All Data is on one spreadsheet.
    -Its divided into stocks which are one row apart and take a total of around 150 rows each.

    So basically this will not include values that don't match U(8+200n).

    All other cells between are filled and the same needs to be done with them, but as different array indexes, so I need to somehow skip out these values when calculating the Percent Rank of each particular array index.

    I then want to do the same for U(9+200n), U(10+200n) until U(43+200n)

    I've done this so far:


    Please Login or Register  to view this content.
    know theres a few things wrong with this such as If I clear contents after I calculate percentrank for one array index (U8:U(8+200*n)) and then move on to the next one (U9:U(9+200*n)) all the ranks of the previous array index so (U8:U(8+200*n)) will be cleared. The code also doesn't seem to understand my defining of j, so usually when I run this script everything on the entire spreadsheet gets removed.

    I've probably explained this quite badly, so let me know if sending you a screenshot would help. If you'd like me to give more information on the project, let me know.

    If you don't have a direct answer - but if you just know a different way to solve it please let me know as its quite important I finish this reasonably soon. Is it best to write it as an array index.

    I've probably over complicated it, as I've never done anything as advanced on VBA before - Cheers In advance for any help,
    Alex.
    Last edited by alocke; 11-10-2011 at 03:17 AM. Reason: Not enough detail

+ 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