How to copy the data in last row and copy to the last row of a table in the same worksheet automatically using excel vba?
I am trying to find way on how to select and copy the data from the last row (column F to I) to the last row of 'summary" table (column O to R). For now this is the code that i found but it seems that it can paste within the same range of column with different row. For example, it will copy data F38:I38 and paste the data at F40:I40. However, what i want is to copy data F38:I38 and the code will find the last row of 'summary'table and paste data F38:I38 to the last empty row. Is it possible to find two last row of the same worksheet but different number of cell? Is there any way i can automate this process? Dim lastRowI As Integer lastRowI = ws.Cells(Rows.Count, 6).End(xlUp).Row ws.Activate ws.Range(Cells(lastRowI, 6), Cells(lastRowI, 9)).Select Selection.Copy ws.Range(Cells(lastRowI + 2, 6), Cells(lastRowI + 2, 9)).Select Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Assuming that you have named your table "Summary", The following code will take you to the last row of "Summary" table ActiveSheet.Range("Summary").Select Selection.End(xlDown).Select
“Cannot insert object” Error when inserting PDF files/objects into Microsoft Excel
Referencing the selection in deactivated Workbook
Excel - Export cells identified by countif to new file
Attempting to search for strings and having syntax errors
Excel Error 1004 when referencing ranges with VBA
Multiple uses of SaveAs freeze Excel
XYScatter Plot Incorrect XAxis when Drawn in Visual Basic?
Why is “if isna vlookup” quicker than “countif”?
PrintLoop mass print all rows of data in file
Look for which cell in a row has a numberic value and return that value to another cell
Check if a matrix is symmetric in Excel and LibreOffice
How to use column letters in VBA
Create a countIfs function that ignores cells with text that has been struck through
Adding and counting values from unique entries
How do I compare two columns in different sheets for non existing values and then copy them to the main sheet?
Is There a Way to Pull Individual Rows from Multiple Sheet Excel