If you run this macro from the DAILY ACTIVITIES sheet, it will put the names and hours into column A:B
Option Explicit
Sub GetNamesHours()
'JBeaucaire (11/11/2009)
Dim r As Long, ws As Worksheet, MyDate As String
MyDate = Format(Range("H5"), "DD-MMM")
Set ws = Sheets("Rotas")
With ws.Range("A:A")
r = .Find(MyDate, _
LookIn:=xlValues, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False, _
SearchFormat:=False).Row
End With
Range("A9:B25").ClearContents
ws.Range(ws.Cells(r, "C"), ws.Cells(r, "AE")).SpecialCells(xlCellTypeConstants).Copy
Range("B9").PasteSpecial xlPasteValues, Transpose:=True
ws.Range(ws.Cells(r, "C"), ws.Cells(r, "AE")).SpecialCells(xlCellTypeConstants).Offset(-11, 0).Copy
Range("A9").PasteSpecial xlPasteValues, Transpose:=True
End Sub
Bookmarks