View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default code help please

The following returns the first row that is completely empty. May not be at
the end of your data:

Sub FirstEmptyRow()
Dim j As Long
Dim i As Long
Dim rr As Range

Set rr = ActiveSheet.UsedRange

j = rr.Rows.Count + rr.Row
If j 65536 Then
Exit Sub
End If

For i = 1 To j
If Application.CountA(Rows(i)) = 0 Then
Cells(i, 1).Select
Exit Sub
End If
Next i
End Sub
--
Gary''s Student


"sevelingard" wrote:

i am trying to create a simple macro whereby i add in a new person to a
holiday chart which involves adding in some formula lines and so on, but how
do i make sure my macros start copy pasting at the next available line ?