guna_sekar87
Member
Dear Chandoo,
I am Gunasekaran B. I attended your Excel Training Program.
Now, I have an issue in my work. The work is very much time consuming.
So, please guide me to create a Macro tool for this automation.
Input : Coloumn A
1 DTC 0001h
2 72h
3 73h
4 98h
1) Remove the text “DTC” from “DTC 0001h” and get 0001
2) Concatenate 0001 with 72h and remove “h”
3) Concatenate 0001 with 73h and remove “h”
4) Concatenate 0001 with 98h and remove “h”
Final output :
Coloumn A
1 000172
2 000173
3 000198
The Point to remember here is, The Input Data is not continuous. It has blank cell in between.
1)If there is blank cell, ”outside the DTC”, I should delete that(11,12,13,14 cell of coloum A).
Therefore, I should start with “DTC” and do the 4 steps till I reach other “DTC” and I should delete the blank cells in between till the reach the other DTC.
Input :
Coloumn A
1 DTC 0001h
2 72h
3 73h
4 98h
5 DTC 0002h
6 23h
7 24h
8 91h
9 F5h
10F6h
11
12
13
14
15DTC 0016h
16 62h
Final output :
1 000172
2 000173
3 000198
4 000223
5 000224
6 000291
7 0002F5
8 0002F6
9 001662
2) If there is blank cell, ”inside the DTC”, I should delete (cell 2,5 of coloumn A)that also.
Input :
Coloumn A
1 DTC 0340h
2
3 31h
4 64h
5
6 DTC 0380h
7 11h
8 12h
9 13h
10 96h
11 98h
Output :
Coloumn A
1 034031
2 034064
3 038011
4 038012
5 038013
6 038096
7 038098
Kindly, do the needful. Waiting for your valuable reply.
Regards,
Gunasekaran
I am Gunasekaran B. I attended your Excel Training Program.
Now, I have an issue in my work. The work is very much time consuming.
So, please guide me to create a Macro tool for this automation.
Input : Coloumn A
1 DTC 0001h
2 72h
3 73h
4 98h
1) Remove the text “DTC” from “DTC 0001h” and get 0001
2) Concatenate 0001 with 72h and remove “h”
3) Concatenate 0001 with 73h and remove “h”
4) Concatenate 0001 with 98h and remove “h”
Final output :
Coloumn A
1 000172
2 000173
3 000198
The Point to remember here is, The Input Data is not continuous. It has blank cell in between.
1)If there is blank cell, ”outside the DTC”, I should delete that(11,12,13,14 cell of coloum A).
Therefore, I should start with “DTC” and do the 4 steps till I reach other “DTC” and I should delete the blank cells in between till the reach the other DTC.
Input :
Coloumn A
1 DTC 0001h
2 72h
3 73h
4 98h
5 DTC 0002h
6 23h
7 24h
8 91h
9 F5h
10F6h
11
12
13
14
15DTC 0016h
16 62h
Final output :
1 000172
2 000173
3 000198
4 000223
5 000224
6 000291
7 0002F5
8 0002F6
9 001662
2) If there is blank cell, ”inside the DTC”, I should delete (cell 2,5 of coloumn A)that also.
Input :
Coloumn A
1 DTC 0340h
2
3 31h
4 64h
5
6 DTC 0380h
7 11h
8 12h
9 13h
10 96h
11 98h
Output :
Coloumn A
1 034031
2 034064
3 038011
4 038012
5 038013
6 038096
7 038098
Kindly, do the needful. Waiting for your valuable reply.
Regards,
Gunasekaran