Thread: Macros and VB
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 Macros and VB

If I have not understood you question, then ignore this response. Let's say
we have rows of data on Sheet 17 down to row #13 or any arbitrary row. We
want to exit the macro with the selectied cell at the next available empty
row, say in column A.

So in our case the selection would be at A14.

Sub hentzer()
Sheets("Sheet 17").Activate
Set r = Intersect(ActiveSheet.UsedRange, Range("A:A"))
Cells(1, 1).Offset(r.Count, 0).Select
End Sub
--
Gary''s Student - gsnu200789


"Hentzer" wrote:

Hiya

Already submitted a question but think I may have bn looking at the problem
wrong, so gonna try a different way but I'm clueless when it comes to VB,
once I have run a macro I want to edit it so that it goes to the available
row (row header will be there tho) on a specific spreadsheet in stead of a
certain cell or row, can I do this? If so how? Please remember I am a
novice at VB so make it simple to follow please ;oD LOL

Thanks


Angi