+ Reply to Thread
Results 1 to 6 of 6

Return row number that matches two conditions: one arithmetic, one count/incidence

  1. #1
    Registered User
    Join Date
    01-04-2013
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    3

    Return row number that matches two conditions: one arithmetic, one count/incidence

    This seems like it should be simple, but I am STUCK! Please help me out.

    I have a hierarchy. Each level of the hierarchy has a number. Each row has a "parent"-- the item under which the row is nested in the hierarchy. The hierarchy is dynamic, so the parent row identification needs to be dynamic as well.

    In the attached document, there is a column describing the row member, its hierarchy number, the count of times that hierarchy number has appeared (the lowest level excluded). The formula needs to find the closest (i.e., highest incidence) row that is one level higher in the hierarchy. Might make more sense in the attached.

    I feel like an idiot because I cannot figure it out.

    BTW, I must use a formula, not VBA.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,610

    Re: Return row number that matches two conditions: one arithmetic, one count/incidence

    This looks and reads like a class assignment. Please do not post class work here for others to complete for you.
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    01-04-2013
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Return row number that matches two conditions: one arithmetic, one count/incidence

    Not a class assignment. I'm 34, and I have a professional degree. I distilled the question down to the basics-- sorry if the clarity feels a bit like an assignment. If there's a forum standard for "proving" one's legitimacy, I'm happy to comply to the degree I can. The data is confidential, so I can't post that. I cannot use VBA because another group (offshore) is automating part of the sheet so I don't have access to it.

  4. #4
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Return row number that matches two conditions: one arithmetic, one count/incidence

    What's the criteria for parent row? I don't see any correlation

  5. #5
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Return row number that matches two conditions: one arithmetic, one count/incidence

    From the instructions vs the manual answers it seems like a number of rows have been added to your sheet, hence the spurious "-7" at the end of this formula, to make the calculated answers match the manual ones:

    Anyway, in B12 and copied down:

    =MAX(INDEX(ROW($B$11:B11)*($B$11:B11=B12-1),0))-7

    Edited to add: Sorry in D12, and copied down.
    Last edited by Andrew-R; 01-04-2013 at 08:35 PM.

  6. #6
    Registered User
    Join Date
    01-04-2013
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Return row number that matches two conditions: one arithmetic, one count/incidence

    Thanks Andrew R! You're awesome!

+ 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