Hi, I have been able to normalise imported data which is in the form as in the table below (the number of actual Date columns goes up to 30 or so)
ID Date1 Date2 Date3 Date4 Date5 Date6 etc
123 15-Feb-11 28-Feb-11 03-May-11 17-Jun-11
234 02-Apr-11 04-May-11 14-Jun-11 27-Jun-11 23-Jul-11
345 11-Jun-11 27-Jul-11 18-Aug-11 13-Sep-11
456 26-Oct-10 20-Dec-10 07-Mar-11 13-May-11 25-Jun-11 06-Jul-11
to a table:
ID Date
123 15-Feb-11
123 28-Feb-11
123 03-May-11
123 17-Jun-11
234 02-Apr-11
234 04-May-11
234 14-Jun-11
234 27-Jun-11
etc
using a VBA module (attached as a txt file) which I found online. I only had to change the field names and types.
But how do I do the same for where there are two repeated columns (dates and hours) as in the imported table below (again the number of repeated columns goes up to 30).
ID Date1 Hours1 Date2 Hours2 Date3 Hours3 etc
123 15-Feb-11 2 28-Feb-11 4 03-May-11 4
234 02-Apr-11 4 04-May-11 2
345 11-Jun-11 2 27-Jul-11 4 18-Aug-11 2
456 26-Oct-10 3 20-Dec-10 2
I hope you can help
Thanks
Andy
ID Date1 Date2 Date3 Date4 Date5 Date6 etc
123 15-Feb-11 28-Feb-11 03-May-11 17-Jun-11
234 02-Apr-11 04-May-11 14-Jun-11 27-Jun-11 23-Jul-11
345 11-Jun-11 27-Jul-11 18-Aug-11 13-Sep-11
456 26-Oct-10 20-Dec-10 07-Mar-11 13-May-11 25-Jun-11 06-Jul-11
to a table:
ID Date
123 15-Feb-11
123 28-Feb-11
123 03-May-11
123 17-Jun-11
234 02-Apr-11
234 04-May-11
234 14-Jun-11
234 27-Jun-11
etc
using a VBA module (attached as a txt file) which I found online. I only had to change the field names and types.
But how do I do the same for where there are two repeated columns (dates and hours) as in the imported table below (again the number of repeated columns goes up to 30).
ID Date1 Hours1 Date2 Hours2 Date3 Hours3 etc
123 15-Feb-11 2 28-Feb-11 4 03-May-11 4
234 02-Apr-11 4 04-May-11 2
345 11-Jun-11 2 27-Jul-11 4 18-Aug-11 2
456 26-Oct-10 3 20-Dec-10 2
I hope you can help
Thanks
Andy