Hi All,
I'm new to the forum and to the macro world. Here is what I'm trying to do:
I'm new to the forum and to the macro world. Here is what I'm trying to do:
- I have a datastream that consists of 23 datapoints/tag ID's that are logged on one minute intervals (see "Source Data")
- I would like to write a macro that select this data, sort it by date/time in ascending order, store numerical values as integers, copy the data, and transpose the data into a new workbook (see "Desired Format")
- I would like to be able to extract the source data into the new workbook without having to open the source data
Here are a few of the subtleties that are really throwing me for a loop:
- The range varies depending on when I download the source data
- Depending on when the source data is downloaded, the data tags/time stamps are not always the same
- I'm brand new to thisSource Data
Var Name
Time String
Var Value
16
8/17/2017 16:48
11.68718
17
8/17/2017 16:48
18
8/17/2017 16:48
5.160007
19
8/17/2017 16:48
35.0317
20
8/17/2017 16:48
64.51823
21
8/17/2017 16:48
8.507451
22
8/17/2017 16:48
237.8111
23
8/17/2017 16:48
11.01189
1
8/17/2017 16:49
63.87153
2
8/17/2017 16:49
224.6817
3
8/17/2017 16:49
26.2641
4
8/17/2017 16:49
21.99421
5
8/17/2017 16:49
2.101758
6
8/17/2017 16:49
450.557
7
8/17/2017 16:49
63.24147
8
8/17/2017 16:49
26.43088
9
8/17/2017 16:49
14.90093
10
8/17/2017 16:49
20.85473
11
8/17/2017 16:49
27.56299
12
8/17/2017 16:49
16.36641
13
8/17/2017 16:49
67.8
14
8/17/2017 16:49
256.2681
15
8/17/2017 16:49
964.3976
16
8/17/2017 16:49
11.794
17
8/17/2017 16:49
18
8/17/2017 16:49
5.131602
19
8/17/2017 16:49
34.98778
20
8/17/2017 16:49
64.67014
21
8/17/2017 16:49
8.528718
22
8/17/2017 16:49
239.2578
23
8/17/2017 16:49
11.62359
1
8/17/2017 16:50
64.09722
2
8/17/2017 16:50
226.7506
3
8/17/2017 16:50
26.2424
4
8/17/2017 16:50
21.98591
5
8/17/2017 16:50
2.081016
6
8/17/2017 16:50
451.0634
7
8/17/2017 16:50
63.22338
8
8/17/2017 16:50
26.42253
9
8/17/2017 16:50
14.89425
10
8/17/2017 16:50
20.86643
<tbody>
</tbody>
Desired FormatDate/Time<o></o>
1<o></o>
2<o></o>
3<o></o>
4<o></o>
5<o></o>
6<o></o>
7<o></o>
8<o></o>
9<o></o>
10<o></o>
11<o></o>
12<o></o>
13<o></o>
14<o></o>
15<o></o>
16<o></o>
17<o></o>
18<o></o>
19<o></o>
20<o></o>
21<o></o>
22<o></o>
23<o></o>
8/17/2017 16:48<o></o><o></o>
<o></o>
<o></o>
<o></o>
<o></o>
<o></o>
<o></o>
<o></o>
<o></o>
<o></o>
<o></o>
<o></o>
<o></o>
<o></o>
<o></o>
12<o></o>
0<o></o>
5<o></o>
35<o></o>
65<o></o>
9<o></o>
238<o></o>
11<o></o>
8/17/2017 16:49<o></o>
64<o></o>
225<o></o>
26<o></o>
22<o></o>
2<o></o>
451<o></o>
63<o></o>
26<o></o>
15<o></o>
21<o></o>
28<o></o>
16<o></o>
68<o></o>
256<o></o>
964<o></o>
12<o></o>
0<o></o>
5<o></o>
35<o></o>
65<o></o>
9<o></o>
239<o></o>
12<o></o>
8/17/2017 16:50<o></o>
64<o></o>
227<o></o>
26<o></o>
22<o></o>
2<o></o>
451<o></o>
63<o></o>
26<o></o>
15<o></o>
21<o></o>
28<o></o>
16<o></o>
68<o></o>
255<o></o>
966<o></o>
12<o></o>
0<o></o>
5<o></o>
35<o></o>
65<o></o>
9<o></o>
239<o></o>
11<o></o>
<tbody>
</tbody>
I have tried muddling around on Youtube and the internet, but I have to admit that this is not my sweet spot (geologist by education). Is what I'd like to do possible with a macro? Any guidance would be greatly appreciated.
Cheers,
Keith
Cheers,
Keith