Sheet2.Cells(1, lastCol + 1).Offset(lastRow2, 0) LastRow2 = sheet2.Cells(Rows.Count, "A").End(xlUp).Row LastCol = sheet2.Cells(1, Columns.Count).End(xlToLeft).Column Set sheet3 = copiedFile.Worksheets("sheet3") Set sheet2 = copiedFile.Worksheets("sheet2") Set copiedFile = (newFilePath)īut when I try to merge sheet2 and sheet3 together like so: public function copyFile(newFilePath As String) I've been able to do this with the following code: public function copyFile(newFilePath As String) ![]() ![]() And what I am trying to do is create a temp file from an original file, then edit it. ![]() I don't want to keep A1 from the second sheet because they share the same ID column. I have an Excel workbook with two sheets.Īnd the range for the second sheet is: B1:I
0 Comments
Leave a Reply. |