Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default Combine ranges from 2 sheet into 3rd

After selecting a group of names in ColA, I currently use the following routine(s) to
populate a range based on that selection under today's date on sheet1 with checkmarks,
confirm the Total and then copy them to a corresponding range on sheet2:

Sub FindDate()
On Error GoTo Quit
Application.ScreenUpdating = False
With Selection.Offset(0, Rows(2).Find(Date, LookIn:=xlFormulas).Column - 1)
.Value = Chr(252): .Font.Name = "Wingdings"
End With
Set Total = Rows(2).Find(Date).Offset(Range("Attendance").Rows .Count + 1, 0)
response = MsgBox("Is this total correct? " & Chr(13) & Total, vbYesNo)
If response = vbNo Then End
Call CopyToday
Quit:
Application.ScreenUpdating = True
End Sub

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?

--
David
  #2   Report Post  
Posted to microsoft.public.excel.programming
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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combine multiple ranges into one worksheet Troy Man Excel Discussion (Misc queries) 1 September 30th 08 05:57 AM
combine data into third sheet Sri Excel Worksheet Functions 2 June 20th 08 04:29 AM
Combine 2 ranges in different sheets using Pivot Table Jac Excel Discussion (Misc queries) 0 December 21st 06 08:03 AM
Combine all the data's from different sheet to one sheet. cheenu Excel Worksheet Functions 1 May 15th 06 04:34 PM
how to combine two similiar sheet Donna Excel Worksheet Functions 2 March 14th 06 08:55 AM


All times are GMT +1. The time now is 11:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"