Using a macro to paste into first empty row in a new worksheet

G

Guest

Using a macro within a workbook, I am wishing to paste information from other
worksheets into an existing work sheet which already contains rows of data.
The macro should be able to determine the first empty row and then paste. I
cannot determine which function to use and how?
 
G

Guest

Sub lookit()
Set s1 = Sheets("Sheet1")
Set s2 = Sheets("Sheet2")
Set r1 = Selection

For i = 1 To Rows.Count
If Application.CountA(s2.Rows(i)) = 0 Then
r1.Copy s2.Cells(i, "A")
Exit Sub
End If
Next
End Sub

Select the material you want to copy on Sheet1; the macro sill copy it to
the first blank row in Sheet2
 
T

Theo

This is very close to what I'm looking for EXCEPT
I want it to paste the validation edits ONLY.
Theo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top