I have two seperate sheets. Sheet 1(CALCULATOR) has values that are entered in cells scattered on the sheet. I want to be able to copy values from specific cells on sheet 1.
On Sheet 2(Calclogs), I have a table. I first make a new row. And on that row, I want each cell that is copied from sheet one to be pasted in each column on the new row.
I have successfully made a new row on the table and then I figured out how to copy a specific cell from Sheet 1, however I dont know how to select the last row and specific column in the table on Sheet 2 so i can paste the value in the correct column of the last row.
On Sheet 2(Calclogs), I have a table. I first make a new row. And on that row, I want each cell that is copied from sheet one to be pasted in each column on the new row.
I have successfully made a new row on the table and then I figured out how to copy a specific cell from Sheet 1, however I dont know how to select the last row and specific column in the table on Sheet 2 so i can paste the value in the correct column of the last row.
VBA Code:
Dim ws1 As Worksheet
Dim ws2 As Worksheet
Dim Calclogs As ListObject
Set Calculator = Sheets("Calculator")
Set Calclogs_sht = Sheets("Calclogs_sht")
Dim CalclogsTable As ListObject
Set CalclogsTable = Calclogs_sht.ListObjects("Calclogs")
Calculator.Select
Range("B1").MergeArea.Cut
lastrow = CalclogsTable.ListColumns(1).Range.Rows.Count
CalclogsTable.Range(lastrow, 1).Select