+ Reply to Thread
Results 1 to 8 of 8

Define FirstRow & LastRow in a subset of data

  1. #1
    Forum Contributor
    Join Date
    07-16-2009
    Location
    australia
    MS-Off Ver
    Excel 2007
    Posts
    116

    Define FirstRow & LastRow in a subset of data

    Can you define FirstRow and LastRow functions define a set or group of number? The start and end of a set so in sampledata sheet for column A for numbers = 1 FirstRow would equal A2 and lastRow equal to A8. That would allow me to then know the range of numbers for my PercentRank function.

    I have been trying without success. My code represents where I am going but if you have other code please let me know.

    This code is attemping to define a values of a group which all have a number 1 as its value and work out the percent rank of values in Column C and return it to column D.
    Please Login or Register  to view this content.
    What I am trying to acheive is column D in the Sampledata workbook.

    So that PERCENTRANK(Cells("FirstRow, C": "LastRow, C", "Cellref needing loop")) when column A equals 1 would translate to
    Please Login or Register  to view this content.
    And then repeat for each number in column A.
    Attached Files Attached Files

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Define FirstRow & LastRow in a subset of data

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    07-16-2009
    Location
    australia
    MS-Off Ver
    Excel 2007
    Posts
    116

    Re: Define FirstRow & LastRow in a subset of data

    Awesome thank you so much
    Last edited by shg; 08-26-2010 at 08:02 PM. Reason: deleted spurious quote

  4. #4
    Forum Contributor
    Join Date
    07-16-2009
    Location
    australia
    MS-Off Ver
    Excel 2007
    Posts
    116

    Re: Define FirstRow & LastRow in a subset of data

    The PercentRank function doesn't work. I am getting an error sub or functionundefined.

    The help menu has the function as
    Please Login or Register  to view this content.
    But what expression should be in front of the percent rank.

  5. #5
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Define FirstRow & LastRow in a subset of data

    It doesn't work as written as it invalid, I just changed what you had to show you the syntax on that part.

    DO you want to insert the formula into the cell, or do you want to evaluate that function?

  6. #6
    Forum Contributor
    Join Date
    07-16-2009
    Location
    australia
    MS-Off Ver
    Excel 2007
    Posts
    116

    Re: Define FirstRow & LastRow in a subset of data

    Well in the sampledata spreadsheet the answer to evaluate for each cell would go in column D. I then want to repeat for each number in column A(Each group).

    I am trying to find percentrank for each individual per class(listed by number in spreashseet).

  7. #7
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Define FirstRow & LastRow in a subset of data

    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    07-16-2009
    Location
    australia
    MS-Off Ver
    Excel 2007
    Posts
    116

    Re: Define FirstRow & LastRow in a subset of data

    I am not getting any errors but I am not getting any data out either?

    If Group.Value = "X" Then

    Group.Value = 8

    I think its waiting for X to equal 8
    Last edited by flebber; 08-27-2010 at 06:42 AM.

+ 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