AventAClue
New Member
- Joined
- Sep 4, 2011
- Messages
- 21
Hi all,
Looking for some help if anyone can do so please?
I have two worksheets, and wish to copy data from one to the other, matching it up to the date column on the second worksheet.
Worksheet “DataDownload” simply holds data in both columns A and B.
Column A cells hold a date / time stamp in the format below, and a corresponding value for that time is in the adjacent cell in Column B ( each cell in column A increments 5 minutes from the one previously).
Column A Column B
<table class="MsoNormalTable" style="width: 155.15pt; border-collapse: collapse;" border="0" cellpadding="0" cellspacing="0" width="207"> <tbody><tr style="height: 13.55pt;"> <td style="width: 118.85pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="158" nowrap="nowrap">
</td> <td style="width: 36.3pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="48" nowrap="nowrap">
</td> </tr> <tr style="height: 13.55pt;"> <td style="width: 118.85pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="158" nowrap="nowrap"> </td> <td style="width: 36.3pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="48" nowrap="nowrap"> </td> </tr> <tr style="height: 13.55pt;"> <td style="width: 118.85pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="158" nowrap="nowrap"> </td> <td style="width: 36.3pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="48" nowrap="nowrap">
</td> </tr> <tr style="height: 13.55pt;"> <td style="width: 118.85pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="158" nowrap="nowrap"> </td> <td style="width: 36.3pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="48" nowrap="nowrap"> </td> </tr> <tr style="height: 13.55pt;"> <td style="width: 118.85pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="158" nowrap="nowrap"> </td> <td style="width: 36.3pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="48" nowrap="nowrap"> </td> </tr> <tr style="height: 13.55pt;"> <td style="width: 118.85pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="158" nowrap="nowrap"> </td> <td style="width: 36.3pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="48" nowrap="nowrap"> </td> </tr> <tr style="height: 13.55pt;"> <td style="width: 118.85pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="158" nowrap="nowrap"> </td> <td style="width: 36.3pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="48" nowrap="nowrap"> </td> </tr> <tr style="height: 13.55pt;"> <td style="width: 118.85pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="158" nowrap="nowrap"> </td> <td style="width: 36.3pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="48" nowrap="nowrap"> </td> </tr> <tr style="height: 13.55pt;"> <td style="width: 118.85pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="158" nowrap="nowrap"> </td> <td style="width: 36.3pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="48" nowrap="nowrap"> </td> </tr> <tr style="height: 13.55pt;"> <td style="width: 118.85pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="158" nowrap="nowrap"> </td> <td style="width: 36.3pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="48" nowrap="nowrap"> </td> </tr> <tr style="height: 13.55pt;"> <td style="width: 118.85pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="158" nowrap="nowrap"> </td> <td style="width: 36.3pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="48" nowrap="nowrap"> </td> </tr> <tr style="height: 13.55pt;"> <td style="width: 118.85pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="158" nowrap="nowrap"> </td> <td style="width: 36.3pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="48" nowrap="nowrap"> </td> </tr> <tr style="height: 13.55pt;"> <td style="width: 118.85pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="158" nowrap="nowrap"> </td> <td style="width: 36.3pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="48" nowrap="nowrap"> </td> </tr> <tr style="height: 13.55pt;"> <td style="width: 118.85pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="158" nowrap="nowrap"> </td> <td style="width: 36.3pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="48" nowrap="nowrap"> </td> </tr> <tr style="height: 13.55pt;"> <td style="width: 118.85pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="158" nowrap="nowrap"> </td> <td style="width: 36.3pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="48" nowrap="nowrap"> </td> </tr> <tr style="height: 13.55pt;"> <td style="width: 118.85pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="158" nowrap="nowrap"> </td> <td style="width: 36.3pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="48" nowrap="nowrap"> </td> </tr> <tr style="height: 13.55pt;"> <td style="width: 118.85pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="158" nowrap="nowrap"> </td> <td style="width: 36.3pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="48" nowrap="nowrap"> </td> </tr> <tr style="height: 13.55pt;"> <td style="width: 118.85pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="158" nowrap="nowrap"> </td> <td style="width: 36.3pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="48" nowrap="nowrap">
</td> </tr> <tr style="height: 13.55pt;"> <td style="width: 118.85pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="158" nowrap="nowrap"> </td> <td style="width: 36.3pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="48" nowrap="nowrap">
</td> </tr> <tr style="height: 13.55pt;"> <td style="width: 118.85pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="158" nowrap="nowrap"> </td> <td style="width: 36.3pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="48" nowrap="nowrap">
</td> </tr> </tbody></table>
Worksheet “Manipulated” shows only the date along Row 2, and the corresponding values for that date (ie all values associated with that date) are entered in row 4 down to row 291, and then the next date down the next column, and the next date, and so on till there is no more data available.
<table class="MsoNormalTable" style="width: 277.15pt; margin-left: 4.65pt; border-collapse: collapse;" border="0" cellpadding="0" cellspacing="0" width="370"> <tbody><tr style="height: 15pt;"> <td style="width: 57.45pt; padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="77" nowrap="nowrap"> </td> <td style="width: 49.65pt; padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="66" nowrap="nowrap"> </td> <td style="width: 53.35pt; padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="71" nowrap="nowrap"> </td> <td style="width: 58.35pt; padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="78" nowrap="nowrap"> </td> <td style="width: 58.35pt; padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="78" nowrap="nowrap"> </td> </tr> <tr style="height: 15pt;"> <td style="width: 57.45pt; border-width: 1pt medium; border-style: solid none; border-color: windowtext -moz-use-text-color; padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="77" nowrap="nowrap"> </td> <td style="width: 49.65pt; border-width: 1pt medium; border-style: solid none; border-color: windowtext -moz-use-text-color; padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="66" nowrap="nowrap"> </td> <td style="width: 53.35pt; border-width: 1pt medium; border-style: solid none; border-color: windowtext -moz-use-text-color; padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="71" nowrap="nowrap"> </td> <td style="width: 58.35pt; border-width: 1pt medium; border-style: solid none; border-color: windowtext -moz-use-text-color; padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="78" nowrap="nowrap"> </td> <td style="width: 58.35pt; border-width: 1pt medium; border-style: solid none; border-color: windowtext -moz-use-text-color; padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="78" nowrap="nowrap"> </td> </tr> <tr style="height: 15.75pt;"> <td style="width: 57.45pt; padding: 0cm 5.4pt; height: 15.75pt;" valign="bottom" width="77" nowrap="nowrap"> </td> <td style="width: 49.65pt; padding: 0cm 5.4pt; height: 15.75pt;" valign="bottom" width="66" nowrap="nowrap"> </td> <td style="width: 53.35pt; padding: 0cm 5.4pt; height: 15.75pt;" valign="bottom" width="71" nowrap="nowrap"> </td> <td style="width: 58.35pt; padding: 0cm 5.4pt; height: 15.75pt;" valign="bottom" width="78" nowrap="nowrap"> </td> <td style="width: 58.35pt; padding: 0cm 5.4pt; height: 15.75pt;" valign="bottom" width="78" nowrap="nowrap"> </td> </tr> <tr style="height: 15pt;"> <td style="width: 57.45pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="77" nowrap="nowrap"> </td> <td style="width: 49.65pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="66" nowrap="nowrap"> </td> <td style="width: 53.35pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="71" nowrap="nowrap"> </td> <td style="width: 58.35pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="78" nowrap="nowrap"> </td> <td style="width: 58.35pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="78" nowrap="nowrap"> </td> </tr> <tr style="height: 15pt;"> <td style="width: 57.45pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="77" nowrap="nowrap"> </td> <td style="width: 49.65pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="66" nowrap="nowrap"> </td> <td style="width: 53.35pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="71" nowrap="nowrap"> </td> <td style="width: 58.35pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="78" nowrap="nowrap"> </td> <td style="width: 58.35pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="78" nowrap="nowrap"> </td> </tr> <tr style="height: 15pt;"> <td style="width: 57.45pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="77" nowrap="nowrap"> </td> <td style="width: 49.65pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="66" nowrap="nowrap"> </td> <td style="width: 53.35pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="71" nowrap="nowrap"> </td> <td style="width: 58.35pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="78" nowrap="nowrap"> </td> <td style="width: 58.35pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="78" nowrap="nowrap"> </td> </tr> <tr style="height: 15pt;"> <td style="width: 57.45pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="77" nowrap="nowrap"> </td> <td style="width: 49.65pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="66" nowrap="nowrap"> </td> <td style="width: 53.35pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="71" nowrap="nowrap"> </td> <td style="width: 58.35pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="78" nowrap="nowrap"> </td> <td style="width: 58.35pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="78" nowrap="nowrap"> </td> </tr> <tr style="height: 15pt;"> <td style="width: 57.45pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="77" nowrap="nowrap"> </td> <td style="width: 49.65pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="66" nowrap="nowrap"> </td> <td style="width: 53.35pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="71" nowrap="nowrap"> </td> <td style="width: 58.35pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="78" nowrap="nowrap"> </td> <td style="width: 58.35pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="78" nowrap="nowrap"> </td> </tr> <tr style="height: 15pt;"> <td style="width: 57.45pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="77" nowrap="nowrap"> </td> <td style="width: 49.65pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="66" nowrap="nowrap"> </td> <td style="width: 53.35pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="71" nowrap="nowrap"> </td> <td style="width: 58.35pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="78" nowrap="nowrap"> </td> <td style="width: 58.35pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="78" nowrap="nowrap"> </td> </tr> <tr style="height: 15pt;"> <td style="width: 57.45pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="77" nowrap="nowrap"> </td> <td style="width: 49.65pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="66" nowrap="nowrap"> </td> <td style="width: 53.35pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="71" nowrap="nowrap"> </td> <td style="width: 58.35pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="78" nowrap="nowrap"> </td> <td style="width: 58.35pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="78" nowrap="nowrap"> </td> </tr> <tr style="height: 15pt;"> <td style="width: 57.45pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="77" nowrap="nowrap"> </td> <td style="width: 49.65pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="66" nowrap="nowrap"> </td> <td style="width: 53.35pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="71" nowrap="nowrap"> </td> <td style="width: 58.35pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="78" nowrap="nowrap"> </td> <td style="width: 58.35pt; background: none repeat scroll 0% 0% rgb(238, 236, 225); padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="78" nowrap="nowrap"> </td> </tr> </tbody></table>
I have a template for the “Manipulated” worksheet and I start by placing the first date of the records (from worksheet DataDownload) into cell B2, and then drag /autofill that along row 2 for approx 100 days.
I then go to worksheet “datadownload” and copy all the values in column B relating to that first date, starting at the 5 minute mark of that date (as that’s the first 5 mins of data), and finishing at 00:00 of the next date (which is always going to be 288 cells).
Paste those values into worksheet “manipulated” under the first date, beginning at cell B4, through to cell B291
Do the same thing for the next date, and so on, and so on……
I’m hoping to automate this process, as it’s very slow going, and open to errors on my behalf as I lose concentration.
I'd actually like if I could have a macro button that on pressing, sees the first date on the "manipulated" worksheet, copies and pastes the appropriate data from "'datadownload" worksheet, and loops through all the dates available .
Thanks for looking and hope someone can help
Cheers.
Looking for some help if anyone can do so please?
I have two worksheets, and wish to copy data from one to the other, matching it up to the date column on the second worksheet.
Worksheet “DataDownload” simply holds data in both columns A and B.
Column A cells hold a date / time stamp in the format below, and a corresponding value for that time is in the adjacent cell in Column B ( each cell in column A increments 5 minutes from the one previously).
Column A Column B
<table class="MsoNormalTable" style="width: 155.15pt; border-collapse: collapse;" border="0" cellpadding="0" cellspacing="0" width="207"> <tbody><tr style="height: 13.55pt;"> <td style="width: 118.85pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="158" nowrap="nowrap">
</td> <td style="width: 36.3pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="48" nowrap="nowrap">
</td> </tr> <tr style="height: 13.55pt;"> <td style="width: 118.85pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="158" nowrap="nowrap">
Date stamp
Value
.
.
.
</td> </tr> <tr style="height: 13.55pt;"> <td style="width: 118.85pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="158" nowrap="nowrap">
28/07/2011 23:45
1230
28/07/2011 23:50
1228
28/07/2011 23:55
1259
29/07/2011 0:00
1260
29/07/2011 0:05
1224
29/07/2011 0:10
1223
29/07/2011 0:15
1223
29/07/2011 0:20
1225
29/07/2011 0:25
345
29/07/2011 0:30
26
29/07/2011 0:35
25
29/07/2011 0:40
43
29/07/2011 0:45
63
29/07/2011 0:50
46
.
</td> </tr> <tr style="height: 13.55pt;"> <td style="width: 118.85pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="158" nowrap="nowrap">
.
</td> </tr> <tr style="height: 13.55pt;"> <td style="width: 118.85pt; padding: 0cm 5.4pt; height: 13.55pt;" valign="bottom" width="158" nowrap="nowrap">
.
</td> </tr> </tbody></table>
Worksheet “Manipulated” shows only the date along Row 2, and the corresponding values for that date (ie all values associated with that date) are entered in row 4 down to row 291, and then the next date down the next column, and the next date, and so on till there is no more data available.
<table class="MsoNormalTable" style="width: 277.15pt; margin-left: 4.65pt; border-collapse: collapse;" border="0" cellpadding="0" cellspacing="0" width="370"> <tbody><tr style="height: 15pt;"> <td style="width: 57.45pt; padding: 0cm 5.4pt; height: 15pt;" valign="bottom" width="77" nowrap="nowrap">
Tue
Wed
Thu
Fri
Sat
29-Jul-11
30-Jul-11
31-Jul-11
12-Aug-11
13-Aug-11
Pulses
Pulses
Pulses
Pulses
Pulses
345
32
32
53
774
26
31
32
31
26
25
31
32
33
26
43
32
32
32
25
46
31
32
31
65
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
I have a template for the “Manipulated” worksheet and I start by placing the first date of the records (from worksheet DataDownload) into cell B2, and then drag /autofill that along row 2 for approx 100 days.
I then go to worksheet “datadownload” and copy all the values in column B relating to that first date, starting at the 5 minute mark of that date (as that’s the first 5 mins of data), and finishing at 00:00 of the next date (which is always going to be 288 cells).
Paste those values into worksheet “manipulated” under the first date, beginning at cell B4, through to cell B291
Do the same thing for the next date, and so on, and so on……
I’m hoping to automate this process, as it’s very slow going, and open to errors on my behalf as I lose concentration.
I'd actually like if I could have a macro button that on pressing, sees the first date on the "manipulated" worksheet, copies and pastes the appropriate data from "'datadownload" worksheet, and loops through all the dates available .
Thanks for looking and hope someone can help
Cheers.