zareva
New Member
- Joined
- Oct 16, 2013
- Messages
- 34
[TABLE="width: 500, align: center"]
<tbody>[TR]
[TD]Number 1
[/TD]
[TD]Date[/TD]
[TD]Number 2[/TD]
[TD]Name[/TD]
[TD]Name ID[/TD]
[TD]Amount[/TD]
[TD]Currency[/TD]
[TD]Receipt Code[/TD]
[TD]Time[/TD]
[TD]Status[/TD]
[TD]Status1[/TD]
[/TR]
[TR]
[TD]12345678901234[/TD]
[TD]10/31/2015[/TD]
[TD]30340259[/TD]
[TD]john[/TD]
[TD]123[/TD]
[TD]769[/TD]
[TD]USD[/TD]
[TD]9315[/TD]
[TD]2014-03-06T04:20:54.977+0000[/TD]
[TD]Unmatched[/TD]
[TD]Successful[/TD]
[/TR]
[TR]
[TD]12345678904321[/TD]
[TD]10/31/2015[/TD]
[TD]30336976[/TD]
[TD]lily[/TD]
[TD]343[/TD]
[TD]1349.96[/TD]
[TD]USD[/TD]
[TD]7781[/TD]
[TD]2014-03-06T02:59:32.503+0000[/TD]
[TD]Unmatched[/TD]
[TD]Successful[/TD]
[/TR]
[TR]
[TD]12345678901234[/TD]
[TD]10/31/2015[/TD]
[TD]30340259[/TD]
[TD]john[/TD]
[TD]123[/TD]
[TD]769[/TD]
[TD]USD[/TD]
[TD]9315[/TD]
[TD]2014-03-06T04:20:54.977+0000[/TD]
[TD]Reconciled[/TD]
[TD]Successful[/TD]
[/TR]
[TR]
[TD]12345678904321[/TD]
[TD]10/31/2015[/TD]
[TD]30336976[/TD]
[TD]lily[/TD]
[TD]343[/TD]
[TD]1349.96[/TD]
[TD]USD[/TD]
[TD]7781[/TD]
[TD]2014-03-06T02:59:32.503+0000[/TD]
[TD]Reconciled[/TD]
[TD]Successful[/TD]
[/TR]
[TR]
[TD]12345678906644[/TD]
[TD]10/31/2015[/TD]
[TD]30336925[/TD]
[TD]Tony[/TD]
[TD]999[/TD]
[TD]1817.94[/TD]
[TD]USD[/TD]
[TD]7752[/TD]
[TD]2014-03-06T02:57:47.900+0000[/TD]
[TD]Unmatched[/TD]
[TD]Successful[/TD]
[/TR]
</tbody>[/TABLE]
I have the table above.
The objective is a VBA code to loop through the column named - Number 2 and if it finds duplicate records (values) to delete all the rows that contains such duplicates. For example, if the code finds that rows 1 and 3 contain one and the same value in the Number 2 column, to delete both rows -1 and 3. Furthermore, the code has to copy the unique records (rows) that hadn't been deleted to a new sheet. In this sheet I need to have a search box that will allow me to search by the whole or only part of the number in Number 1 column - just s ctrl+f works.
As a final result,I need to have a table in the new sheet that only consist of the last row in the example table above. Please have in mind that I will add new records daily to the initial table and need to have only unique records in the second sheet. Might be, it's a god idea if the initial table (sheet 1) be copied firstly to a new sheet and afterword the code to starts. This way I will not loose the original data in sheet one, which is required.
Thank you in advance,
Zareva
<tbody>[TR]
[TD]Number 1
[/TD]
[TD]Date[/TD]
[TD]Number 2[/TD]
[TD]Name[/TD]
[TD]Name ID[/TD]
[TD]Amount[/TD]
[TD]Currency[/TD]
[TD]Receipt Code[/TD]
[TD]Time[/TD]
[TD]Status[/TD]
[TD]Status1[/TD]
[/TR]
[TR]
[TD]12345678901234[/TD]
[TD]10/31/2015[/TD]
[TD]30340259[/TD]
[TD]john[/TD]
[TD]123[/TD]
[TD]769[/TD]
[TD]USD[/TD]
[TD]9315[/TD]
[TD]2014-03-06T04:20:54.977+0000[/TD]
[TD]Unmatched[/TD]
[TD]Successful[/TD]
[/TR]
[TR]
[TD]12345678904321[/TD]
[TD]10/31/2015[/TD]
[TD]30336976[/TD]
[TD]lily[/TD]
[TD]343[/TD]
[TD]1349.96[/TD]
[TD]USD[/TD]
[TD]7781[/TD]
[TD]2014-03-06T02:59:32.503+0000[/TD]
[TD]Unmatched[/TD]
[TD]Successful[/TD]
[/TR]
[TR]
[TD]12345678901234[/TD]
[TD]10/31/2015[/TD]
[TD]30340259[/TD]
[TD]john[/TD]
[TD]123[/TD]
[TD]769[/TD]
[TD]USD[/TD]
[TD]9315[/TD]
[TD]2014-03-06T04:20:54.977+0000[/TD]
[TD]Reconciled[/TD]
[TD]Successful[/TD]
[/TR]
[TR]
[TD]12345678904321[/TD]
[TD]10/31/2015[/TD]
[TD]30336976[/TD]
[TD]lily[/TD]
[TD]343[/TD]
[TD]1349.96[/TD]
[TD]USD[/TD]
[TD]7781[/TD]
[TD]2014-03-06T02:59:32.503+0000[/TD]
[TD]Reconciled[/TD]
[TD]Successful[/TD]
[/TR]
[TR]
[TD]12345678906644[/TD]
[TD]10/31/2015[/TD]
[TD]30336925[/TD]
[TD]Tony[/TD]
[TD]999[/TD]
[TD]1817.94[/TD]
[TD]USD[/TD]
[TD]7752[/TD]
[TD]2014-03-06T02:57:47.900+0000[/TD]
[TD]Unmatched[/TD]
[TD]Successful[/TD]
[/TR]
</tbody>[/TABLE]
I have the table above.
The objective is a VBA code to loop through the column named - Number 2 and if it finds duplicate records (values) to delete all the rows that contains such duplicates. For example, if the code finds that rows 1 and 3 contain one and the same value in the Number 2 column, to delete both rows -1 and 3. Furthermore, the code has to copy the unique records (rows) that hadn't been deleted to a new sheet. In this sheet I need to have a search box that will allow me to search by the whole or only part of the number in Number 1 column - just s ctrl+f works.
As a final result,I need to have a table in the new sheet that only consist of the last row in the example table above. Please have in mind that I will add new records daily to the initial table and need to have only unique records in the second sheet. Might be, it's a god idea if the initial table (sheet 1) be copied firstly to a new sheet and afterword the code to starts. This way I will not loose the original data in sheet one, which is required.
Thank you in advance,
Zareva
Last edited: