Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

324
Views
Excel formula to compute the time Of "Logoff" record and its nearest "Logon" record above

LogOn LogOff Sample

I would like to have a 3rd column that only shows the time duration if the 2nd column value is "PC LogOff". The time duration will get the 1st instance of "PC LogOn" before the "PC LogOff" occurred. Is this possible in Excel?

about 4 years ago · Santiago Trujillo
2 answers
Answer question

0

XLOOKUP() will give you desired result.

=IF(B1="PC LogOf",A1-XLOOKUP("PC LogOn",$B$1:$B1,$A$1:$A1,0,0,-1),"")

enter image description here

about 4 years ago · Santiago Trujillo Report

0

If you don't have XLOOKUP, in C2 put =IF(B2="PC LogOn",A2,C1) and drag down, with C1 being just =A1.
Then in D1 put =IF(B1="PC LogOff",A1-C1,"") and drag down.

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!