Hi,
I have a first sheet (Sheet1) with information about name in C3, phone number in C4, email in C5 and notes in C6. I want to copy this information to Sheet2 in column A, B, C and D (name, phone, email, notes). I want Excel to find the next empty row based on values in column A and then copy the information to these columns to this row.
I have the below code but something is wrong since my phonenumber in cell C4 is raplacing the name in column A on Sheet2 when I run it.
I have a first sheet (Sheet1) with information about name in C3, phone number in C4, email in C5 and notes in C6. I want to copy this information to Sheet2 in column A, B, C and D (name, phone, email, notes). I want Excel to find the next empty row based on values in column A and then copy the information to these columns to this row.
I have the below code but something is wrong since my phonenumber in cell C4 is raplacing the name in column A on Sheet2 when I run it.
VBA Code:
Sub Skriv_in()
Dim LastRow As Long
LastRow = Sheets("Sheet2").Cells(Rows.Count, 1).End(xlUp).Offset(1).Row
Sheets("Sheet1").Range("C3").Copy Sheets("Sheet2").Cells(LastRow, 1)
Dim LastRow2 As Long
LastRow2 = Sheets("Sheet2").Cells(Rows.Count, 1).End(xlUp).Offset(0, 1).Row
Sheets("Sheet1").Range("C4").Copy Sheets("Sheet2").Cells(LastRow2, 1)
End Sub