Thread: Debug This
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
al al is offline
external usenet poster
 
Posts: 363
Default Debug This

Quite simple Im sure

Dim x As Integer
x = 1
For x = 1 To 12
Worksheets(x).Select



Range("A5:I5").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Worksheets("Summary").Select
Range("a65536").Select
Selection.End(xlUp).Select
ActiveCell.Offset(1, 0).Select
ActiveSheet.Paste
Next x

I am trying to copy the data from each sheet from a5:i5 down but it doesnt
work if there is nothing in the range. How do I fix it?
Thanks!