Hello,

I would like to request some help in coding a VBA module please.... I have attached a sample of a HR report that my company pulls from the attendance system. Now, this report looks like and does all I need, but the formatting does not allow me to easily pull statistics and further manipulate the data in excel. What I would need is a macro that I can run upon import of the sytem report, which helps me to reformat and align all the data on the sheet.

Particularly, this needs to be done:
* Column J holds the staff position, while all clocking-in / -out data is captured in the line below. I need this aligned in the same row.
* One staff can have multiple clocking records over a certain period of time. Every time there is a clocking record, I would like to have the staff name, id and position copied and shown in the same row.

I attached a BEFORE and AFTER sheet to highlight what I would need changed. The main challenge I am facing here is that I have around 600 employees on this report and would need to data arranged for every single one of them. I did play around with INDEX(), OFFSET() and VLOOKUP via excel functions, but just dont get anywhere since the format is too dynamic for me in order too use static formulas...

I would be more than happy to buy whoever fixes this for me a beer or two. or ten, depending on how much you can drink... (university students are exempt from this clause)

THANKS!
A2k

test.xls