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
Conditional AGGREGATE/Median in Excel 2010
Excel VBA filtering a column and then copying each item in the area collection to a matching row
Excel addition of multiple numbers in single cell
How do I autofill code in VBA?
Use excel VBA to update master list based on user input data
Change number format of a cell which inlude currecny using visual basic
Access reading Excel VBA date in US format
Changing a file name and path in a formula (within a macro) to user-defined
Excel conditional formating - conditional on sum of all previous cells and total sum
Consolidating single rows of data from multiple sheets into one - looping the macro?
Excel FInd and Replace Regex Macro
Excel VBA Loop function for all cells
Excel/VBA uncheck checkboxes if madatory field is empty
Excel VBA continually returning 0
Excel VBA: unable to disable DisplayAlert during drag+drop?
How to deal with Cyrillic letters caused error (#REF) in Worksheets (Unicode VBA display and handling), in VBA