Compile data

ghederberg

New Member
Joined
Jul 26, 2017
Messages
2
Hi,

Im having a problem where I want to compile data from several rows into 1 single row.
The data in this case is time and attendance data to upload into a payroll software.
There are 9 different columns as follows:
  • Code
  • Code nr
  • Code name
  • Employee ID
  • Employee name
  • Number (hours/days)
  • Type of number (hours/days)
  • Start Date
  • End date

If we as an example say that I register 5 days holiday in the system it will look like this in the excel I receive:

CodeCode nrCode NameEmployee IDEEnameNumber(hours/days)Type of nr (hours/days)Start DateEnd date
T111Vacation12345Donald Duck1Days24/07/201724/07/2017
T111Vacation12345Donald Duck1Days24/07/201725/07/2017
T111Vacation12345Donald Duck1Days26/07/201726/07/2017
T111Vacation12345Donald Duck1Days27/07/201727/07/2017
T111Vacation12345Donald Duck1Days28/07/201728/07/2017

<tbody>
</tbody>

I want to create something within XL that can do like this

CodeCode nrCode nameEmployee IDEE nameNumberType of nr (hours/days)Start DateEnd date
T111Vacation12345Donald Duck5Days24/07/201728/07/2017

<tbody>
</tbody>


Above example is of 1 employee and 1 absence type. In the actual report there are around 650 employees with 5-6 different absence/attendance types. Further if the period of leave is not 1 full period I want to split those rows up.
Example lets say I took vacation 24th july, came back to work on the 25th and then took 3 days between 26-28 it would look like this in the excel.
CodeCode nrCode nameEmployee numberEmployee namenumbertype of number (hours/days)Start DateEnd date
T111Vacation12345Donald Duck1Days24/07/201724/07/2017
T111Vacation12345Donald Duck1Days26/07/201726/07/2017
T111Vacation12345Donald Duck1Days27/07/201727/07/2017
T111Vacation12345Donald Duck1Days28/07/201728/07/2017

<tbody>
</tbody>

I want to create something in excel making it look like this
CodeCode nrCode nameEmployee nrEmployee namenumbertype of nr (hours/days)Start DateEnd date
T111Vacation12345Donald Duck1Days24/07/201724/07/2017
T111Vacation12345Donald Duck3Days26/07/201728/07/2017

<tbody>
</tbody>

Again, above is only 1 example. Lets say I have 1 day vacation and then 2 days sickleve. I dont want those 2 absence types to be together.
In the excel I get from the software it would look like this:
CodeCode nrCode nameEmployee nrEmployee namenumbertype of nr (days/hours)Start dateEnd date
T111Vacation12345Donald duck1Days24/07/201724/07/2017
T112Sickness12345Donald duck8hours25/07/201725/07/2017
T112Sickness12345Donald Duck8hours26/07/201726/07/2017

<tbody>
</tbody>

I want to create something in excel making it look like this:
CodeCode nrCode nameEmployee nrEmployee namenumbertype of nr (days/hours)Start dateEnd date
T111Vacation12345Donald duck1124/07/201724/07/2017
T112Sickness12345Donald Duck16hours25/07/201726/07/2017

<tbody>
</tbody>

Any assistance would be really appreciated :)

Thanks
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Thanks,
been trying pivot, it only solves a part of the problem. Adding the dates "from/to" is where the pivot fails. It does not compile 3 rows into 1, it will give 1 row per employee and date. In case you got any great tips on how that can be solved within pivot youre a star ;)
 
Upvote 0

Forum statistics

Threads
1,214,864
Messages
6,121,986
Members
449,060
Latest member
mtsheetz

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