I know this is not the programming forum, but issues like this I always use a little macro to do the job. I've adapted it for your needs.
Option Explicit
Sub GetData()
'JBeaucaire (10/5/2009)
'Opens conciliated sheet and parses the data
'to individual sheets in this workbook
Dim LR As Long, ws As Worksheet, MyStr As String
Dim wbkOld As Workbook, wbkNew As Workbook, CloseIt As Boolean
Set wbkNew = ThisWorkbook
'Open workbook if needed
On Error Resume Next
Set wbkOld = Workbooks("conciliated sheet.xls")
On Error GoTo 0
If wbkOld Is Nothing Then
Workbooks.Open "conciliated sheet.xls"
CloseIt = True
End If
wbkOld.Activate
Sheets("Sheet1 (2)").Activate
Range("A1:C1").AutoFilter
For Each ws In wbkNew.Worksheets
MyStr = ws.Name
Range("A1:C1").AutoFilter Field:=3, Criteria1:=MyStr
LR = wbkOld.Sheets("Sheet1 (2)").Range("A" & Rows.Count).End(xlUp).Row
If LR > 1 Then
ws.Range("A3:B" & Rows.Count).ClearContents
wbkOld.Sheets("Sheet1 (2)").Range("A2:B" & LR).Copy ws.Range("A3")
End If
Next ws
Range("A1:C1").AutoFilter
If CloseIt Then wbkOld.Close False
End Sub
The macro is designed to work with your sheets as you've shown them. I've highlighted the parts of the code you would need to edit / change to match your actual working sheets.
=============
How to install the macro:
1. Open up your "attand.xls" workbook
2. Get into VB Editor (Press Alt+F11)
3. Insert a new module (Insert > Module)
4. Copy and Paste in your code (given above)
5. Get out of VBA (Press Alt+Q)
6. Save your sheet
The macro is installed and ready to use. Press Alt-F8 and select it from the macro list.
Bookmarks