I've 2 excel sheets(Sheet1 & Sheet2) in my Excel workbook. I want to copy row data from Sheet2
to Sheet1
.
Condition is:
if Sheet2
copied row doesn't exist in Sheet1
then paste it otherwise don't paste the row.
Copied Rows except 1st row in Sheet2
:
Range dataWithoutFirstRow = xlAccrualSheet.Range[xlAccrualSheet.UsedRange.Cells[2, 1],
xlAccrualSheet.UsedRange.SpecialCells(XlCellType.xlCellTypeLastCell)];
dataWithoutFirstRow.Copy();
Paste in below used range in Sheet1:
Range DataRange = xlAccrualWorkSheet.Cells[emptycell, 1];
DataRange.PasteSpecial(XlPasteType.xlPasteAllUsingSourceTheme);
Please Tell me How to check already exist rows in Sheet1.
Awaiting for Your Response