I have Excel sheet with data of person multiple logins in a particular day i wish to seperate only one login per day in different row

huangapple go评论105阅读模式
英文:

I have Excel sheet with data of person multiple logins in a particular day i wish to seperate only one login per day in different row

问题

员工在02/07/23登录系统10次,在03/07/2023登录5次,然后第二天登录7次,以此类推。我想要精炼数据,以获取员工每天一次登录,以便我可以知道员工何时休假。

由于员工每天多次登录系统,很难找出他何时休假,因为数据太多,所以我只想将他的登录精炼为每天一次。

英文:

Employee has logged in to the system 10 times on 02/07/23, 5 times in 03/07/2023, then 7 times next day and so on, I want to refine the data to get employee one login per day so that I can know on which date the employee was on leave.

As the employee has logged in multiple times in to the system each day it's difficult to find out on which day he was on leave as there is so much data, so I just want to refine his logins to one per day.

答案1

得分: 1

以下是翻译好的部分:

你可以按如下方式获取日期列中的缺失日期:

给定条件:

  • 登录日期的列为A列。
  • 感兴趣的日期范围为2023年3月1日至2023年3月30日。

首先,我们需要一个三月份所有日期的列表:

DATE(2023, 3, 1) + SEQUENCE(31,,0)

我们将想要将其与登录日期的列进行匹配,如果没有匹配,则返回该日期。我们可以使用LET函数来增加清晰度:

 LET(  DT
     , DATE(2023, 3, 1) + SEQUENCE(31,,0)
     , IF( ISERROR( MATCH( DT, $A:$A, 0 ) ), DT, "--" )
    )

最后,我们可以将整个过程包装在UNIQUESORT中以清理输出:

SORT( UNIQUE( LET(  DT
                   , DATE(2023, 3, 1) + SEQUENCE( 31,,0)
                   , IF( ISERROR( MATCH( DT, $A:$A, 0 ) ), DT, "--" )
                 )
            )
    )

样本输入:

A列
2023/3/1
2023/3/2
2023/3/3
2023/3/4
2023/3/5
2023/3/6
2023/3/6
2023/3/6
2023/3/9
2023/3/10
2023/3/11
2023/3/12
2023/3/13
2023/3/13
2023/3/15
2023/3/16
2023/3/17
2023/3/18
2023/3/19
2023/3/19
2023/3/19
2023/3/22
2023/3/23
2023/3/24
2023/3/25
2023/3/26
2023/3/27
2023/3/28
2023/3/29
2023/3/30
2023/3/31

结果:

结果
2023/3/7
2023/3/8
2023/3/14
2023/3/20
2023/3/21
--
英文:

You can get the missing dates in a column of dates as follows:

Givens:

  • Column of login dates is Column A.
  • Date range of interest is 3/1/2023 to 3/30/2023

First we need a list of all days in the month of March:

DATE(2023, 3, 1) + SEQUENCE(31,,0)

We will want to match that against the column of login dates and return the date if it is not matched. We can use the LET function to add clarity:

 LET(  DT
     , DATE(2023, 3, 1) + SEQUENCE(31,,0)
     , IF( ISERROR( MATCH( DT, $A:$A, 0 ) ), DT, "--" )
    )

Finally, we can wrap the whole thing in a UNIQUE and SORT to clean the output:

SORT( UNIQUE( LET(  DT
                   , DATE(2023, 3, 1) + SEQUENCE( 31,,0)
                   , IF( ISERROR( MATCH( DT, $A:$A, 0 ) ), DT, "--" )
                 )
            )
    )

Sample Input:

Column A
3/1/2023
3/2/2023
3/3/2023
3/4/2023
3/5/2023
3/6/2023
3/6/2023
3/6/2023
3/9/2023
3/10/2023
3/11/2023
3/12/2023
3/13/2023
3/13/2023
3/15/2023
3/16/2023
3/17/2023
3/18/2023
3/19/2023
3/19/2023
3/19/2023
3/22/2023
3/23/2023
3/24/2023
3/25/2023
3/26/2023
3/27/2023
3/28/2023
3/29/2023
3/30/2023
3/31/2023

Yields:

Result
3/7/2023
3/8/2023
3/14/2023
3/20/2023
3/21/2023
--

huangapple
  • 本文由 发表于 2023年7月12日 21:14:28
  • 转载请务必保留本文链接:https://go.coder-hub.com/76671001.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定