+ Reply to Thread
Results 1 to 3 of 3

Return index value position for value based on two criteria

  1. #1
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Return index value position for value based on two criteria

    I'm helping somebody with a spreadsheet formula and hoping I can get some further help myself.

    I'm using a formula succesfully, but only with one criteria. I need to add a second criteria, but not sure how to fit it in.

    CSE (Cell A4 and copied down)
    =IF(ROWS($A$4:A4)<=$A$2,SMALL(IF(ssclass=A$1,ROW(ssclass)-ROW($A$2)+1),ROWS($A$4:A4)),"")

    Right now it's looking at the named range ssclass and comparing against A1 but I also need it to compare against a named range routenum and match against A3.

    So basically, the formula should look at A1 (Infant) and also A3 (Rt # 1) and return the index position so B4 and C4 can return the first and last names which works fine. Just not A4.

    Any thoughts?
    Attached Files Attached Files
    Last edited by jeffreybrown; 06-07-2011 at 08:05 PM.
    HTH
    Regards, Jeff

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Return index value position for value based on two criteria

    Hello Jeff, try this formula in A4 confirmed with CTRL+SHIFT+ENTER and copied down

    =IF(ROWS($A$4:A4)<=$A$2,SMALL(IF((ssclass=A$1)*(routenum=A$3),ROW(ssclass)-MIN(ROW(ssclass))+1),ROWS($A$4:A4)),"")

    I highlighted changes/additions in red
    Audere est facere

  3. #3
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Return index value position for value based on two criteria

    Hi DLL,

    Amazing as always...Thanks a million

+ 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