Coping & pasting data in first blank cell in same worksheet

Closed
Jim - Dec 2, 2014 at 09:46 PM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Dec 8, 2014 at 11:58 AM
Hello,
I would like the vba code for a macro ( using a form button) that copies data from cell:M1 to A13:A30
depending on which is the first blank cell. Its all on the same worksheet.

Your previous solution using multiple sheets and the same row has me confused!
Thanks in advance
Desperate Jim

1 response

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 555
Dec 8, 2014 at 11:58 AM
Hi Jim,

Not sure which previous solution you are referring to but try this code:
Sub RunMe()
For Each cell In Range("A13:A30")
    If cell.Value = vbNullString Then
        cell.Value = Range("M1")
        Exit Sub
    End If
Next cell
End Sub


Best regards,
Trowa
5