Hi all, i would like to create a VBA so that to adjust the below data in right columns and entering headings too as my below extract. In sch.1. are the data which the columns are mixed and in sch.2. is the expected result. I would be greatly appreciated any help. Thanks in advance
Sch.1.
<colgroup><col style="mso-width-source:userset;mso-width-alt:1060;width:22pt" width="29"> <col style="width:48pt" width="64" span="4"> <col style="mso-width-source:userset;mso-width-alt:3181;width:65pt" width="87"> <col style="mso-width-source:userset;mso-width-alt:1682;width:35pt" width="46"> <col style="mso-width-source:userset;mso-width-alt:1097;width:23pt" width="30"> <col style="mso-width-source:userset;mso-width-alt:1682;width:35pt" width="46"> <col style="width:48pt" width="64" span="6"> <col style="mso-width-source:userset;mso-width-alt:1718;width:35pt" width="47"> </colgroup><tbody>
[TD="class: xl69, width: 29, align: center"]
[/TD]
[TD="class: xl69, width: 64, align: center"]A[/TD]
[TD="class: xl69, width: 64, align: center"]B[/TD]
[TD="class: xl69, width: 64, align: center"]C[/TD]
[TD="class: xl69, width: 64, align: center"]D[/TD]
[TD="class: xl69, width: 87, align: center"]E[/TD]
[TD="class: xl69, width: 46, align: center"]F[/TD]
[TD="class: xl69, width: 30, align: center"]G[/TD]
[TD="class: xl69, width: 46, align: center"]H[/TD]
[TD="class: xl69, width: 64, align: center"]I[/TD]
[TD="class: xl69, width: 64, align: center"]J[/TD]
[TD="class: xl69, width: 64, align: center"]K[/TD]
[TD="class: xl69, width: 64, align: center"]L[/TD]
[TD="class: xl69, width: 64, align: center"]M[/TD]
[TD="class: xl69, width: 64, align: center"]N[/TD]
[TD="class: xl69, width: 47, align: center"]O[/TD]
[TD="class: xl65, align: center"]1[/TD]
[TD="class: xl66, align: center"]10-02-18[/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl67, align: center"]JV[/TD]
[TD="class: xl67, align: center"]1005623[/TD]
[TD="class: xl70, align: center"] [/TD]
[TD="class: xl70, align: center"] [/TD]
[TD="class: xl70, align: center"] [/TD]
[TD="class: xl71, align: center"]5.62[/TD]
[TD="class: xl72, align: center"] [/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl67, align: center"]DISCOUNT[/TD]
[TD="class: xl68, align: center"] [/TD]
[TD="class: xl67, align: center"]9456[/TD]
[TD="class: xl65, align: center"]2[/TD]
[TD="class: xl66, align: center"] [/TD]
[TD="class: xl66, align: center"]15-02-18[/TD]
[TD="class: xl67, align: center"]1005648[/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl70, align: center"] [/TD]
[TD="class: xl70, align: center"] [/TD]
[TD="class: xl70, align: center"] [/TD]
[TD="class: xl72, align: center"] [/TD]
[TD="class: xl71, align: center"]562.40[/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl67, colspan: 2, align: center"]PURCHASES[/TD]
[TD="class: xl68, align: center"]9458[/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl65, align: center"]3[/TD]
[TD="class: xl66, align: center"]28-02-18[/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl67, align: center"]1005655[/TD]
[TD="class: xl70, align: center"] [/TD]
[TD="class: xl70, align: center"] [/TD]
[TD="class: xl70, align: center"] [/TD]
[TD="class: xl72, align: center"] [/TD]
[TD="class: xl71, align: center"]309.70[/TD]
[TD="class: xl67, colspan: 2, align: center"]PURCHASES[/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl68, align: center"] [/TD]
[TD="class: xl67, align: center"]9465[/TD]
[TD="class: xl65, align: center"]4[/TD]
[TD="class: xl66, align: center"]02-03-18[/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl67, align: center"]JV[/TD]
[TD="class: xl67, align: center"]1005701[/TD]
[TD="class: xl70, align: center"] [/TD]
[TD="class: xl70, align: center"] [/TD]
[TD="class: xl70, align: center"]3.00[/TD]
[TD="class: xl71, align: center"] [/TD]
[TD="class: xl72, align: center"] [/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl67, align: center"]DISCOUNT[/TD]
[TD="class: xl67, align: center"]9518[/TD]
[TD="class: xl68, align: center"] [/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl65, align: center"]5[/TD]
[TD="class: xl66, align: center"]03-03-18[/TD]
[TD="class: xl67, align: center"]1005718[/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl70, align: center"] [/TD]
[TD="class: xl70, align: center"] [/TD]
[TD="class: xl70, align: center"] [/TD]
[TD="class: xl72, align: center"] [/TD]
[TD="class: xl71, align: center"]83.60[/TD]
[TD="class: xl67, colspan: 2, align: center"]PURCHASES[/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl68, align: center"] [/TD]
[TD="class: xl67, align: center"]9524[/TD]
</tbody>
Sch.2.
<colgroup><col style="mso-width-source:userset;mso-width-alt:1060;width:22pt" width="29"> <col style="width:48pt" width="64" span="4"> <col style="mso-width-source:userset;mso-width-alt:3181;width:65pt" width="87"> <col style="mso-width-source:userset;mso-width-alt:1682;width:35pt" width="46"> </colgroup><tbody>
[TD="class: xl69, width: 29, align: center"]
[/TD]
[TD="class: xl69, width: 64, align: center"]A[/TD]
[TD="class: xl69, width: 64, align: center"]B[/TD]
[TD="class: xl69, width: 64, align: center"]C[/TD]
[TD="class: xl69, width: 64, align: center"]D[/TD]
[TD="class: xl69, width: 87, align: center"]E[/TD]
[TD="class: xl69, width: 46, align: center"]F[/TD]
[TD="class: xl65, align: center"]1[/TD]
[TD="class: xl70, align: center"]DATE[/TD]
[TD="class: xl71, align: center"]INV.#[/TD]
[TD="class: xl71, align: center"]DEBIT[/TD]
[TD="class: xl71, align: center"]CREDIT[/TD]
[TD="class: xl71, align: center"]DESCRIPTION[/TD]
[TD="class: xl71, align: center"]TR.#[/TD]
[TD="class: xl65, align: center"]2[/TD]
[TD="class: xl66, align: center"]10-02-18[/TD]
[TD="class: xl67, align: center"]1005623[/TD]
[TD="class: xl72, align: center"]5.62[/TD]
[TD="class: xl73, align: center"] [/TD]
[TD="class: xl67, align: center"]DISCOUNT[/TD]
[TD="class: xl68, align: center"]9456[/TD]
[TD="class: xl65, align: center"]3[/TD]
[TD="class: xl66, align: center"]15-02-18[/TD]
[TD="class: xl67, align: center"]1005648[/TD]
[TD="class: xl72, align: center"] [/TD]
[TD="class: xl72, align: center"]562.40[/TD]
[TD="class: xl67, align: center"]PURCHASES[/TD]
[TD="class: xl69, align: center"]9458[/TD]
[TD="class: xl65, align: center"]4[/TD]
[TD="class: xl66, align: center"]28-02-18[/TD]
[TD="class: xl67, align: center"]1005655[/TD]
[TD="class: xl72, align: center"] [/TD]
[TD="class: xl73, align: center"]309.70[/TD]
[TD="class: xl67, align: center"]PURCHASES[/TD]
[TD="class: xl68, align: center"]9465[/TD]
[TD="class: xl65, align: center"]5[/TD]
[TD="class: xl66, align: center"]02-03-18[/TD]
[TD="class: xl67, align: center"]1005701[/TD]
[TD="class: xl72, align: center"]3.00[/TD]
[TD="class: xl72, align: center"] [/TD]
[TD="class: xl67, align: center"]DISCOUNT[/TD]
[TD="class: xl68, align: center"]9518[/TD]
[TD="class: xl65, align: center"]6[/TD]
[TD="class: xl66, align: center"]03-03-18[/TD]
[TD="class: xl67, align: center"]1005718[/TD]
[TD="class: xl72, align: center"] [/TD]
[TD="class: xl72, align: center"]83.60[/TD]
[TD="class: xl67, align: center"]PURCHASES[/TD]
[TD="class: xl68, align: center"]9524[/TD]
</tbody>
Sch.1.
<colgroup><col style="mso-width-source:userset;mso-width-alt:1060;width:22pt" width="29"> <col style="width:48pt" width="64" span="4"> <col style="mso-width-source:userset;mso-width-alt:3181;width:65pt" width="87"> <col style="mso-width-source:userset;mso-width-alt:1682;width:35pt" width="46"> <col style="mso-width-source:userset;mso-width-alt:1097;width:23pt" width="30"> <col style="mso-width-source:userset;mso-width-alt:1682;width:35pt" width="46"> <col style="width:48pt" width="64" span="6"> <col style="mso-width-source:userset;mso-width-alt:1718;width:35pt" width="47"> </colgroup><tbody>
[TD="class: xl69, width: 29, align: center"]
[/TD]
[TD="class: xl69, width: 64, align: center"]A[/TD]
[TD="class: xl69, width: 64, align: center"]B[/TD]
[TD="class: xl69, width: 64, align: center"]C[/TD]
[TD="class: xl69, width: 64, align: center"]D[/TD]
[TD="class: xl69, width: 87, align: center"]E[/TD]
[TD="class: xl69, width: 46, align: center"]F[/TD]
[TD="class: xl69, width: 30, align: center"]G[/TD]
[TD="class: xl69, width: 46, align: center"]H[/TD]
[TD="class: xl69, width: 64, align: center"]I[/TD]
[TD="class: xl69, width: 64, align: center"]J[/TD]
[TD="class: xl69, width: 64, align: center"]K[/TD]
[TD="class: xl69, width: 64, align: center"]L[/TD]
[TD="class: xl69, width: 64, align: center"]M[/TD]
[TD="class: xl69, width: 64, align: center"]N[/TD]
[TD="class: xl69, width: 47, align: center"]O[/TD]
[TD="class: xl65, align: center"]1[/TD]
[TD="class: xl66, align: center"]10-02-18[/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl67, align: center"]JV[/TD]
[TD="class: xl67, align: center"]1005623[/TD]
[TD="class: xl70, align: center"] [/TD]
[TD="class: xl70, align: center"] [/TD]
[TD="class: xl70, align: center"] [/TD]
[TD="class: xl71, align: center"]5.62[/TD]
[TD="class: xl72, align: center"] [/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl67, align: center"]DISCOUNT[/TD]
[TD="class: xl68, align: center"] [/TD]
[TD="class: xl67, align: center"]9456[/TD]
[TD="class: xl65, align: center"]2[/TD]
[TD="class: xl66, align: center"] [/TD]
[TD="class: xl66, align: center"]15-02-18[/TD]
[TD="class: xl67, align: center"]1005648[/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl70, align: center"] [/TD]
[TD="class: xl70, align: center"] [/TD]
[TD="class: xl70, align: center"] [/TD]
[TD="class: xl72, align: center"] [/TD]
[TD="class: xl71, align: center"]562.40[/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl67, colspan: 2, align: center"]PURCHASES[/TD]
[TD="class: xl68, align: center"]9458[/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl65, align: center"]3[/TD]
[TD="class: xl66, align: center"]28-02-18[/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl67, align: center"]1005655[/TD]
[TD="class: xl70, align: center"] [/TD]
[TD="class: xl70, align: center"] [/TD]
[TD="class: xl70, align: center"] [/TD]
[TD="class: xl72, align: center"] [/TD]
[TD="class: xl71, align: center"]309.70[/TD]
[TD="class: xl67, colspan: 2, align: center"]PURCHASES[/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl68, align: center"] [/TD]
[TD="class: xl67, align: center"]9465[/TD]
[TD="class: xl65, align: center"]4[/TD]
[TD="class: xl66, align: center"]02-03-18[/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl67, align: center"]JV[/TD]
[TD="class: xl67, align: center"]1005701[/TD]
[TD="class: xl70, align: center"] [/TD]
[TD="class: xl70, align: center"] [/TD]
[TD="class: xl70, align: center"]3.00[/TD]
[TD="class: xl71, align: center"] [/TD]
[TD="class: xl72, align: center"] [/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl67, align: center"]DISCOUNT[/TD]
[TD="class: xl67, align: center"]9518[/TD]
[TD="class: xl68, align: center"] [/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl65, align: center"]5[/TD]
[TD="class: xl66, align: center"]03-03-18[/TD]
[TD="class: xl67, align: center"]1005718[/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl70, align: center"] [/TD]
[TD="class: xl70, align: center"] [/TD]
[TD="class: xl70, align: center"] [/TD]
[TD="class: xl72, align: center"] [/TD]
[TD="class: xl71, align: center"]83.60[/TD]
[TD="class: xl67, colspan: 2, align: center"]PURCHASES[/TD]
[TD="class: xl67, align: center"] [/TD]
[TD="class: xl68, align: center"] [/TD]
[TD="class: xl67, align: center"]9524[/TD]
</tbody>
Sch.2.
<colgroup><col style="mso-width-source:userset;mso-width-alt:1060;width:22pt" width="29"> <col style="width:48pt" width="64" span="4"> <col style="mso-width-source:userset;mso-width-alt:3181;width:65pt" width="87"> <col style="mso-width-source:userset;mso-width-alt:1682;width:35pt" width="46"> </colgroup><tbody>
[TD="class: xl69, width: 29, align: center"]
[/TD]
[TD="class: xl69, width: 64, align: center"]A[/TD]
[TD="class: xl69, width: 64, align: center"]B[/TD]
[TD="class: xl69, width: 64, align: center"]C[/TD]
[TD="class: xl69, width: 64, align: center"]D[/TD]
[TD="class: xl69, width: 87, align: center"]E[/TD]
[TD="class: xl69, width: 46, align: center"]F[/TD]
[TD="class: xl65, align: center"]1[/TD]
[TD="class: xl70, align: center"]DATE[/TD]
[TD="class: xl71, align: center"]INV.#[/TD]
[TD="class: xl71, align: center"]DEBIT[/TD]
[TD="class: xl71, align: center"]CREDIT[/TD]
[TD="class: xl71, align: center"]DESCRIPTION[/TD]
[TD="class: xl71, align: center"]TR.#[/TD]
[TD="class: xl65, align: center"]2[/TD]
[TD="class: xl66, align: center"]10-02-18[/TD]
[TD="class: xl67, align: center"]1005623[/TD]
[TD="class: xl72, align: center"]5.62[/TD]
[TD="class: xl73, align: center"] [/TD]
[TD="class: xl67, align: center"]DISCOUNT[/TD]
[TD="class: xl68, align: center"]9456[/TD]
[TD="class: xl65, align: center"]3[/TD]
[TD="class: xl66, align: center"]15-02-18[/TD]
[TD="class: xl67, align: center"]1005648[/TD]
[TD="class: xl72, align: center"] [/TD]
[TD="class: xl72, align: center"]562.40[/TD]
[TD="class: xl67, align: center"]PURCHASES[/TD]
[TD="class: xl69, align: center"]9458[/TD]
[TD="class: xl65, align: center"]4[/TD]
[TD="class: xl66, align: center"]28-02-18[/TD]
[TD="class: xl67, align: center"]1005655[/TD]
[TD="class: xl72, align: center"] [/TD]
[TD="class: xl73, align: center"]309.70[/TD]
[TD="class: xl67, align: center"]PURCHASES[/TD]
[TD="class: xl68, align: center"]9465[/TD]
[TD="class: xl65, align: center"]5[/TD]
[TD="class: xl66, align: center"]02-03-18[/TD]
[TD="class: xl67, align: center"]1005701[/TD]
[TD="class: xl72, align: center"]3.00[/TD]
[TD="class: xl72, align: center"] [/TD]
[TD="class: xl67, align: center"]DISCOUNT[/TD]
[TD="class: xl68, align: center"]9518[/TD]
[TD="class: xl65, align: center"]6[/TD]
[TD="class: xl66, align: center"]03-03-18[/TD]
[TD="class: xl67, align: center"]1005718[/TD]
[TD="class: xl72, align: center"] [/TD]
[TD="class: xl72, align: center"]83.60[/TD]
[TD="class: xl67, align: center"]PURCHASES[/TD]
[TD="class: xl68, align: center"]9524[/TD]
</tbody>