View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Copy Range / Including Adjacent Cells - into Existing Worksheet.

To minimize typing I am using sheets named "s2" and "s5":


Sub buckets()
Set s2 = Sheets("s2")
Set s5 = Sheets("s5")

n = s5.Range("N" & Rows.Count).End(xlUp).Row

For i = 1 To n
If IsEmpty(s5.Cells(i, "N")) Then
Else
Set r1 = Range(s5.Cells(i, "N"), s5.Cells(i, "O"))
Set r2 = s2.Cells(i, "J")
r1.Copy r2
End If
Next
End Sub

--
Gary's Student
gsnu200701


" wrote:

Hello-

Hopefully an easy question but I cannot find an answer and need some
guidance.

All functions occur in same workbook.

I need to find a way with VBA to pull all non-blank cells ( dates )
from column N of worksheet5 along with the number adjacent to it in
column O and paste into column J&K of sheet2 of the same workbook.

Again probably easy but I'm muddling my way through and it's eaten up
most of my night. Any help would be appreciated.

Chuck