View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
David Turner David Turner is offline
external usenet poster
 
Posts: 50
Default Combine ranges from 2 sheet into 3rd

David Turner wrote

Sub CopyToday()
Dim Rng As Range
Set Rng = Rows(2).Find(Date).Offset(1, 0)
Range(Rng, Rng.Offset(Range("Attendance").Rows.Count - 1, 0)).Copy _
Destination:=Sheets(2).Range(Rng.Address).Offset(0 , 1)
End Sub

I now have a need to populate ranges on two sheets with checkmarks and
copy all of them to a third.

How can I do this without undoing what came from sheet1?


Yipee!!!
I fumbled around and ultimately came up with:

Sub CopyToday()
Dim Rng As Range
For i = 1 To 2
Set Rng = Sheets(i).Rows(2).Find(Date).Offset(1, 0)
For Each c In Range(Rng, Rng.Offset(Range("Attendance").Rows.Count - 1,
0))
If c 1 Then c.Copy _
Destination:=Sheets(3).Range(c.Address)
Next c
Next i
End Sub

--
David