Hello
I'm making an assigment for class and got stuck with this..
I have to find the first empty cell in the row, and then copy a specific cell (which changes everyday) into that specific empty cell. My problem is to select the empty row, so I can copy paste the cell into the empty cell. But hwo, then the empty cell is one number??
I have written the following (the problem is coloured with red):
Sub Dagsdata()
Dim Lastrow As Long
Lastrow = Cells(Rows.Count, 1).End(xlUp).Row
Emptyrow = Lastrow + 1
MsgBox Emptyrow
Range("F4").Copy
Range(Emptyrow).Select
Selection.Paste
End Sub
Thanks!!!
I'm making an assigment for class and got stuck with this..
I have to find the first empty cell in the row, and then copy a specific cell (which changes everyday) into that specific empty cell. My problem is to select the empty row, so I can copy paste the cell into the empty cell. But hwo, then the empty cell is one number??
I have written the following (the problem is coloured with red):
Sub Dagsdata()
Dim Lastrow As Long
Lastrow = Cells(Rows.Count, 1).End(xlUp).Row
Emptyrow = Lastrow + 1
MsgBox Emptyrow
Range("F4").Copy
Range(Emptyrow).Select
Selection.Paste
End Sub
Thanks!!!