+ Reply to Thread
Results 1 to 5 of 5

Return last entry in column that matches criteria

Hybrid View

tomlancaster Return last entry in column... 01-22-2010, 09:16 AM
DonkeyOte Re: Return the last entry in... 01-22-2010, 09:37 AM
tomlancaster Re: Return the last entry in... 01-22-2010, 10:07 AM
DonkeyOte Re: Return the last entry in... 01-22-2010, 10:16 AM
tomlancaster Re: Return the last entry in... 01-22-2010, 10:27 AM
  1. #1
    Forum Contributor
    Join Date
    07-21-2009
    Location
    Sheffield, England
    MS-Off Ver
    Excel 2010
    Posts
    117

    Return last entry in column that matches criteria

    Hello - I have sheet which displays an overview of what all users have access to on the system. The formula I am working with at the moment looks at individual sheets listing which users have access to that particular system and if their name is on that system access sheet, it will pull in the system username.

    My problem is sometimes I create a new username for a user, suspend their access and then create a new log-on with a new username for the same user.

    I would like the formula to search for the user's name, and if it's on the sheet to return the last entry username for that user.

    The formula I have at the moment shows the first entry:

    =IF(COUNTIF('SYSTEM ABC'!B:B,OVERVIEW!$C8),IF(SUMPRODUCT(--('SYSTEM ABC'!B$1:B$999=OVERVIEW!$C8),--(ISBLANK('SYSTEM ABC'!G$1:G$999))),INDEX('SYSTEM ABC'!I:I,MATCH(OVERVIEW!$C8,'SYSTEM ABC'!B:B,0)),"N"),"N")
    Can anyone help??

    Thanks

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Return the last entry in a collumn which matches criteria

    Might be easier with a sample so we can visualise...

    Generally speaking you can use LOOKUP to do this

    =LOOKUP(2,1/((range1=criteria1)*(range2=criteria2)),resultrange)
    not particularly efficient though...

  3. #3
    Forum Contributor
    Join Date
    07-21-2009
    Location
    Sheffield, England
    MS-Off Ver
    Excel 2010
    Posts
    117

    Re: Return the last entry in a collumn which matches criteria

    Hi thanks for your response - I've attached a workbook to give you a better visual on what I am trying to achieve. As you can see from the example, the username is showing as "ABC1" but that username has been suspended... The correct username should be "ABC2"

    Thanks
    Attached Files Attached Files

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Return the last entry in a collumn which matches criteria

    You can adapt the example given such that

    E2: 
    =IF($C2="","",IF(COUNTIF('SYSTEM ABC'!$B$2:$B$1000,$C2),LOOKUP(2,1/('SYSTEM ABC'!$B$2:$B$1000=$C2),'SYSTEM ABC'!$I$2:$I$1000),""))

  5. #5
    Forum Contributor
    Join Date
    07-21-2009
    Location
    Sheffield, England
    MS-Off Ver
    Excel 2010
    Posts
    117

    Re: Return the last entry in a collumn which matches criteria

    Thanks for your help

+ 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