View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Find Empty Cell in Row

Try:


Sub Macro1()
For j = 1 To 8
For i = 1 To 7
If Cells(j, i) = "" Then
Cells(j, i).Select
Exit Sub
End If
Next
Next
End Sub

As coded now this little routine just finds the first blank, selects the
cell and returns. Perhaps you could adapt it for your use.
--
Gary's Student


"Steve C" wrote:

I have seven columns, under which I wish to have eight rows of information.
Starting with the first empty cell, I will be pasting information from other
areas of my spreadsheet. I need my code (after an item is copied to the
clipboard) to search each row starting from the top and locate the first
available empty cell, into which the item is then pasted. The code must
search the rows from left to right, and if full, move to the next row and
continue the search. Can someone help? Thanks!

Steve