Retrieving and transposing time data in a separate worksheet

Julkoh

New Member
Joined
Apr 7, 2015
Messages
7
Hello!

Currently, I have a set of raw data that has a time-stamp for each question, each session and for each individual. For example:

[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]Subject[/TD]
[TD]Session[/TD]
[TD]Question[/TD]
[TD]Time[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]1a[/TD]
[TD]1[/TD]
[TD]08:59:22[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]1a[/TD]
[TD]1[/TD]
[TD]09:00:13[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]1a[/TD]
[TD]2[/TD]
[TD]09:01:58[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]1a[/TD]
[TD]2[/TD]
[TD]09:01:33[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]1b[/TD]
[TD]1[/TD]
[TD]08:33:24[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]1b[/TD]
[TD]1[/TD]
[TD]08:31:22[/TD]
[/TR]
</tbody>[/TABLE]












I would need to transpose and combine the data to the following format, in a separate worksheet; so with 1 glance, I can see the time stamp for each subject, with session number and question number grouped together (i.e. session 1a, question 1).

[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]Subject[/TD]
[TD]Session1a_Question1[/TD]
[TD]Session1a_Question2[/TD]
[TD]Session1b_Question1[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]08:59:22[/TD]
[TD]09:01:58[/TD]
[TD]08:33:24[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]09:00:13[/TD]
[TD]09:01:33[/TD]
[TD]08:31:22[/TD]
[/TR]
</tbody>[/TABLE]







I've tried various formulas, including using nested "index", but I just can't seem to get Excel to understand what I'm looking for. Pivot table can't seem to work as well, since I only wanted Excel to retrieve the timestamp, instead of summing them/averaging them. I am sure that all my formulas is wrong and since the amount of data that I have to deal with is extensive, and there is no way that I am going to do this manually. Any help will be very helpful!
 
Last edited:

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Does it have to be a formula or will VBA suffice?

Are all the subjects just given a number, 1, 2, etc as you've suggested or are they text?
Are there only 2 Session types (1a and 1b) or more?
Are there only 2 Questions for each Session or more?
 
Upvote 0
Hello Special-K99, thanks for replying. Either formula or VBA is acceptable.

As for the subjects, they are all numeric numbers.
For session types, there are way more, and it is a combination of alphabets and numbers (e.g. CR Week 1 01012018), and the combination differ for each session.
For the questions, the number of question varies per session. For instance, there can be 10 questions for the 1st session, and 28 questions for the 2nd sessions.

Thank you!
 
Upvote 0
If the number of questions per session varies that means the width of the output could be quite considerable.

I'm afraid this is beyond my knowledge of VBA especially as the subject column is not sorted.
 
Upvote 0

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

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