Copy paste usedrange data and delete duplicate rows

Ravi321

New Member
Joined
Jul 9, 2013
Messages
5
Hi friends,

I need your help, below are the things which i am trying for my code to perform.

• Copy data from range B5:F13 (range will not be fixed)
• Go to sheet “Archive” paste copied range as value from cell A3
• Delete duplicate rows from sheet “Archive” (Like in the sample file last two rows are duplicate so they should get deleted) may be concatenation formula be used for it
• After a month again some new data can be manually added in sheet “Master” below the existing data. So next time when the same VBA code is executed then the whole copied data from “Master” sheet should be copied and pasted in sheet “Archive” below the data which is present earlier. After that again the VBA code should search for the duplicate rows from the entire data and delete it

Link for sample data file
https://www.dropbox.com/s/xfp2aw5wxan6scf/Sample data.xlsm
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
See data and formula in G5andH5 formulas copied down. sort according to col H and delete rows manually

Master

*BCDEFGH
**
abcIndiaMaleabcIndia23Male46000*
defSri LankaMaledefSri Lanka24Male48000*
ghfUKFemalegh***26Female52000*
klmUKMaleklmUK20Male40000*
opqUSAFemaleopqUSA28Female56000*
xyzAfricaFemalexyzAfrica31Female62000*
shfSingaporeMaleshfSingapore24Male48000*
ghfUKFemalegh***26Female52000delete
klmUKMaleklmUK20Male40000delete

<tbody>
[TD="bgcolor: #cacaca, align: center"]4[/TD]
[TD="bgcolor: #808080, align: center"]Name[/TD]
[TD="bgcolor: #808080, align: center"]Country[/TD]
[TD="bgcolor: #808080, align: center"]Age[/TD]
[TD="bgcolor: #808080, align: center"]Sex[/TD]
[TD="bgcolor: #808080, align: center"]Salary[/TD]

[TD="bgcolor: #cacaca, align: center"]5[/TD]

[TD="align: right"]23[/TD]

[TD="align: right"]46000[/TD]

[TD="bgcolor: #cacaca, align: center"]6[/TD]

[TD="align: right"]24[/TD]

[TD="align: right"]48000[/TD]

[TD="bgcolor: #cacaca, align: center"]7[/TD]

[TD="align: right"]26[/TD]

[TD="align: right"]52000[/TD]

[TD="bgcolor: #cacaca, align: center"]8[/TD]

[TD="align: right"]20[/TD]

[TD="align: right"]40000[/TD]

[TD="bgcolor: #cacaca, align: center"]9[/TD]

[TD="align: right"]28[/TD]

[TD="align: right"]56000[/TD]

[TD="bgcolor: #cacaca, align: center"]10[/TD]

[TD="align: right"]31[/TD]

[TD="align: right"]62000[/TD]

[TD="bgcolor: #cacaca, align: center"]11[/TD]

[TD="align: right"]24[/TD]

[TD="align: right"]48000[/TD]

[TD="bgcolor: #cacaca, align: center"]12[/TD]

[TD="align: right"]26[/TD]

[TD="align: right"]52000[/TD]

[TD="bgcolor: #cacaca, align: center"]13[/TD]

[TD="align: right"]20[/TD]

[TD="align: right"]40000[/TD]

</tbody>

Spreadsheet Formulas
CellFormula
G5=CONCATENATE(B5,C5,D5,E5,F5)
H6=IF((COUNTIF($G$5:G6,G6))>1,"delete","")

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top