cajunman64
New Member
- Joined
- Sep 20, 2018
- Messages
- 1
I am looking to create a vba in excel that will look at Column B and E and copy the next duplicate data to the next column and than repeat the program until all duplicate data been copy. Note we have a trending software that will export data to a .csv file....it adds all the sensors data to column C (xxxx.xx),it adds all the sensors name to column B (DHPT-PT1.ActiveReadValue), it adds all the Dates to column D and all the time to column E.
Example:
A B c D E
<colgroup><col><col><col><col><col></colgroup><tbody>
</tbody>
<colgroup><col><col><col><col><col></colgroup><tbody>
</tbody>
<colgroup><col><col><col><col><col></colgroup><tbody>
</tbody>
Looking to copy DHPT-PT1 data with date and time to a new workbook or the same csv file but to a different sheet in column A2 starting Date, B2 Starting Time, Column C2 Starting DHPT1 Values, Column D2 starting DHPT2 Values, and E2 starting DHPT3 values
Column A Column B Column C Column D Column E
1) Date Time DHPT-PT1 DHPT-PT2 DHPT-PT3
2) 9/19/18 29:59.6 9189.453125 8353.460938 9187.732422
3) 9/19/18 30:59.4 9190.800781 8355.167969 9189.123047
4) 9/19/18 31:59.5 9193.142578 8357.449219 9191.445313
5) 9/19/18 32:59.6 9191.109375 8358.40332 9189.433594
6) 9/19/18 33:59.7 9192.280273 8356.188477 9190.560547
Thanks for the help
Example:
A B c D E
Trend File | Tag Name | Tag Value | Tag Timestamp (Date) | Tag Timestamp (Time) |
Test1.tvw | DHPT-PT1.ActiveReadValue | 9189.453125 | 9/19/18 | 29:59.6 |
Test1.tvw | DHPT-PT1.ActiveReadValue | 9190.800781 | 9/19/18 | 30:59.4 |
Test1.tvw | DHPT-PT1.ActiveReadValue | 9193.142578 | 9/19/18 | 31:59.5 |
Test1.tvw | DHPT-PT1.ActiveReadValue | 9191.109375 | 9/19/18 | 32:59.6 |
Test1.tvw | DHPT-PT1.ActiveReadValue | 9192.280273 | 9/19/18 | 33:59.7 |
<colgroup><col><col><col><col><col></colgroup><tbody>
</tbody>
Test1.tvw | DHPT-PT2.ActiveReadValue | 8353.460938 | 9/19/18 | 29:59.6 |
Test1.tvw | DHPT-PT2.ActiveReadValue | 8355.167969 | 9/19/18 | 30:59.4 |
Test1.tvw | DHPT-PT2.ActiveReadValue | 8357.449219 | 9/19/18 | 31:59.5 |
Test1.tvw | DHPT-PT2.ActiveReadValue | 8358.40332 | 9/19/18 | 32:59.6 |
Test1.tvw | DHPT-PT2.ActiveReadValue | 8356.188477 | 9/19/18 | 33:59.7 |
<colgroup><col><col><col><col><col></colgroup><tbody>
</tbody>
Test1.tvw | DHPT-PT3.ActiveReadValue | 9187.732422 | 9/19/18 | 29:59.6 |
Test1.tvw | DHPT-PT3.ActiveReadValue | 9189.123047 | 9/19/18 | 30:59.4 |
Test1.tvw | DHPT-PT3.ActiveReadValue | 9191.445313 | 9/19/18 | 31:59.5 |
Test1.tvw | DHPT-PT3.ActiveReadValue | 9189.433594 | 9/19/18 | 32:59.6 |
Test1.tvw | DHPT-PT3.ActiveReadValue | 9190.560547 | 9/19/18 | 33:59.7 |
<colgroup><col><col><col><col><col></colgroup><tbody>
</tbody>
Looking to copy DHPT-PT1 data with date and time to a new workbook or the same csv file but to a different sheet in column A2 starting Date, B2 Starting Time, Column C2 Starting DHPT1 Values, Column D2 starting DHPT2 Values, and E2 starting DHPT3 values
Column A Column B Column C Column D Column E
1) Date Time DHPT-PT1 DHPT-PT2 DHPT-PT3
2) 9/19/18 29:59.6 9189.453125 8353.460938 9187.732422
3) 9/19/18 30:59.4 9190.800781 8355.167969 9189.123047
4) 9/19/18 31:59.5 9193.142578 8357.449219 9191.445313
5) 9/19/18 32:59.6 9191.109375 8358.40332 9189.433594
6) 9/19/18 33:59.7 9192.280273 8356.188477 9190.560547
Thanks for the help