+ Reply to Thread
Results 1 to 8 of 8

Provide last user ignoring blanks except if only data

  1. #1
    Registered User
    Join Date
    07-11-2023
    Location
    Utah
    MS-Off Ver
    2306
    Posts
    3

    Provide last user ignoring blanks except if only data

    I have a set of 150k devices where I need to display the last person and date/time they logged onto that device. I know I can use data filters to create a column of unique SNs, and I can use MAX to find the last login date, but I have some blanks and I would like to exclude those unless there is no other user data. (For example, the last login for SN1 was blank, but yesterday a person logged in, so I want to capture yesterday's person. On the other hand, SN4 shows only blanks, so I would like it to say something like "No user info available" for those.) I know I can do an IF statement for that part, but cannot figure out how to combine if last login is blank, then go to the next one with a user, and if they are all blank, show "no info avail".
    Attached Files Attached Files
    Last edited by CatZ; 07-13-2023 at 02:05 PM. Reason: Solved

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Provide last user ignoring blanks except if only data

    Delete ALL expected results:

    =LET(A,A2:A20,B,B2:B20,C,C2:C20,D,UNIQUE(A),E,IFERROR(MAP(D,LAMBDA(x,TAKE(FILTER(B,(A=x)*(B<>"")),1))),"No User ID"),F,MAP(D,LAMBDA(x,TAKE(IFERROR(FILTER(C,(A=x)*(B<>"")),C),1))),HSTACK(D,E,F))
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,428

    Re: Provide last user ignoring blanks except if only data

    Another formula:

    Make sure the dates and times in column C are numeric (not an alphanumeric string) and please try in F18:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    There are some differences with the expected results and Glenn's formula.
    I've indicated these differences, but I think this formula is correct.
    Attached Files Attached Files
    Last edited by HansDouwe; 07-12-2023 at 08:50 PM.

  4. #4
    Forum Contributor
    Join Date
    10-22-2022
    Location
    Santa Cruz, Bolivia
    MS-Off Ver
    MSO 365
    Posts
    145

    Re: Provide last user ignoring blanks except if only data

    hi everyone, I allow to propose another possible solution:

    Please Login or Register  to view this content.
    I hope it results useful.

  5. #5
    Registered User
    Join Date
    07-11-2023
    Location
    Utah
    MS-Off Ver
    2306
    Posts
    3

    Re: Provide last user ignoring blanks except if only data

    Thanks all! Glenn's shows the top date (6/25) for sn4 instead of the actual date (6/13), and Hans's shows 0. I could not get Logan's to work. I think Han's will work since we're not as concerned with the ones that don't show the user info. Much appreciated!

  6. #6
    Forum Contributor
    Join Date
    10-22-2022
    Location
    Santa Cruz, Bolivia
    MS-Off Ver
    MSO 365
    Posts
    145

    Re: Provide last user ignoring blanks except if only data

    hi again, try again with this formula:

    Please Login or Register  to view this content.
    My solution assumes that the dates column is sort, so I hope it results useful.

  7. #7
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,428

    Re: Provide last user ignoring blanks except if only data

    Thanks for the feedback and rep . Glad to have helped.

    If you assumes tha the last login is the first row for each device, this formula does also the job:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    In this case its not necessary the date/time is numeric. In that case also an alphanumeric string is alowed and the formula does not return 0 anymore if so.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    07-11-2023
    Location
    Utah
    MS-Off Ver
    2306
    Posts
    3

    Re: Provide last user ignoring blanks except if only data

    Perfect, thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Sum data based on matching name (but ignoring blanks).
    By 2vbr in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-23-2022, 09:04 AM
  2. Sort data in a specific way while ignoring blanks.
    By unlimitedz3r0 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-05-2021, 07:51 PM
  3. [SOLVED] SUMIF, ignoring blanks and find earliest date ignoring blanks
    By Chris_Devon in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-15-2019, 10:16 AM
  4. [SOLVED] Listing data ignoring blanks
    By jsridhar in forum Excel Formulas & Functions
    Replies: 36
    Last Post: 12-08-2015, 09:53 AM
  5. [SOLVED] Data Cleanup - ignoring blanks, ignoring rows with string values etc.
    By Huyaku in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-21-2015, 08:17 AM
  6. SUM last 6 cells with data (ignoring blanks in between)
    By cjohnwalsh in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-08-2014, 08:24 AM
  7. [SOLVED] Move data in rows ignoring blanks
    By mmartin79 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-25-2012, 10:16 AM

Tags for this Thread

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