Identifying last time a person did a task

Veyron

New Member
Joined
Sep 6, 2015
Messages
20
Hi everyone,

I need to find out when was the last time a person did a task.
It sounds easy but due to the way the data is displayed, I am unable to sort it out.

Here you have an example of it:

[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]Name[/TD]
[TD]23/09[/TD]
[TD]24/09[/TD]
[TD]25/09[/TD]
[TD]26/09[/TD]
[TD]27/09[/TD]
[TD]28/09[/TD]
[TD]29/09[/TD]
[/TR]
[TR]
[TD]Worker 1[/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]B[/TD]
[TD]A[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]A[/TD]
[/TR]
[TR]
[TD]Worker 2[/TD]
[TD]B[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]D[/TD]
[TD]A[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]Worker 3[/TD]
[TD]C[/TD]
[TD]C[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]D[/TD]
[TD]A[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]Worker 4[/TD]
[TD]A[/TD]
[TD]A[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD][/TD]
[TD]B[/TD]
[TD]A[/TD]
[/TR]
</tbody>[/TABLE]









Solution would be:

Worker 1
Task A: 29/09
Task B: 25/09
Task C: 27/09
Task D: 28/09

And so on...

Thanks for your help!
 
Last edited:

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
With power query it can be done by unpivoting all of the date columns, which will give 3 columns, name, date and task as an intermediate step.
Then pivot the task column using the date column for values and setting the aggregation to max.

The results come out as below.

Code:
Name	        A       B       C        D
Worker 1	29-Sep	25-Sep	27-Sep	28-Sep
Worker 2	28-Sep	29-Sep	25-Sep	27-Sep
Worker 3	28-Sep	29-Sep	25-Sep	27-Sep
Worker 4	29-Sep	28-Sep	25-Sep	26-Sep

Is that something that you can work with?
 
Upvote 0
With power query it can be done by unpivoting all of the date columns, which will give 3 columns, name, date and task as an intermediate step.
Then pivot the task column using the date column for values and setting the aggregation to max.

The results come out as below.

Code:
Name            A       B       C        D
Worker 1    29-Sep    25-Sep    27-Sep    28-Sep
Worker 2    28-Sep    29-Sep    25-Sep    27-Sep
Worker 3    28-Sep    29-Sep    25-Sep    27-Sep
Worker 4    29-Sep    28-Sep    25-Sep    26-Sep

Is that something that you can work with?

Definitely. I just need to know now how to use Power Query :laugh:
I will look for some tutorials.

Many thanks Jason!
 
Upvote 0
jasonb75 said:
With power query it can be done by unpivoting all of the date columns, which will give 3 columns, name, date and task as an intermediate step.
Then pivot the task column using the date column for values and setting the aggregation to max.

Just to let you know that your solution works.

thanks mate
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top