简体   繁体   中英

finding first and last login in excel

在此处输入图片说明

I need to pull the first and last login for each employee for each date listed. There are about 40 employees and 365 days (give or take).

This formula works but I would have to enter every employee in cell E2 and every date in F2 in order to get the first and last login times.

Is there any way I can do this in one fell swoop and get all first and last for all dates and all employees?

在此处输入图片说明

You do not need any code to achieve this, a basic Pivot Table would solve your problem:

Being on a cell on your data table, select Insert | Pivot Table

Your Pivot data should be automatically selected, and Pivot table should be created as a template.

You may now drag and drop the requested fields from top right to bottom right drawers. In your case Employee and Date fields should go to Rows drawer.

After dragging Time field to Values drawer, you should click on the Time field in the drawer and:

  1. Change the Summarize the field by to "Min"
  2. And using Number Format button on that screen, change the format to Time.

You should now re-drag the Time field to Values and this time summarize the new value as "Max"

At the end, you should be having a view similar to below: 屏幕截图

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM