Chris Humes
New Member
- Joined
- Aug 26, 2013
- Messages
- 3
I have a spreadsheet with employee time data from multiple jobs by date and craft codes. I am needing to loop thru Sheets "TIME LOG" column "A" if it meets job number that is in Sheet "T IMESHEET" range "P5" then it checks for date in TIME LOG sheet if it matches date in TIMESHEET "P4" then it transfers information from certain columns over from active cell. Need a little help finishing it. Thanks
Sub Create_Download_Sheet()<o></o>
<o> </o>
DimTIMELOG As Worksheet
Dim TIMESHEET As Worksheet
Dim DOWNLOAD2 As Worksheet<!--[if !supportLineBreakNewLine]-->
<!--[endif]--><o></o>
Sheets("TIMELOG").Activate
Sheets("TIME LOG").Range("A2").Select<o></o>
Do<o></o>
IfActiveCell = Sheets("TIMESHEET").Range("P4").Value AndActiveCell.Offset(0, 6) = _
Sheets("TIMESHEET").Range("P5") Then<o></o>
<o> </o>
Sheets("DOWNLOAD2").Range("A").Value= Sheets("TIMESHEET").Range("E8").Value 'Work Order
Sheets("DOWNLOAD2").Range("B”).Value = ActiveCell.Offset(0, 3).Value 'Employee Name
Sheets("DOWNLOAD2").Range("C").Value = ActiveCell.Offset(0,4).Value 'Craft Code
Sheets("DOWNLOAD2").Range("L").Value = ActiveCell.Offset(0,13).Value 'Hours
<!--[if !supportLineBreakNewLine]-->
<!--[endif]-->
End If<o></o>
ActiveCell.Offset(1, 0).Select
Loop Until ActiveCell = 0
<o></o>
EndSub <o></o>
Sub Create_Download_Sheet()<o></o>
<o> </o>
DimTIMELOG As Worksheet
Dim TIMESHEET As Worksheet
Dim DOWNLOAD2 As Worksheet<!--[if !supportLineBreakNewLine]-->
<!--[endif]--><o></o>
Sheets("TIMELOG").Activate
Sheets("TIME LOG").Range("A2").Select<o></o>
Do<o></o>
IfActiveCell = Sheets("TIMESHEET").Range("P4").Value AndActiveCell.Offset(0, 6) = _
Sheets("TIMESHEET").Range("P5") Then<o></o>
<o> </o>
Sheets("DOWNLOAD2").Range("A").Value= Sheets("TIMESHEET").Range("E8").Value 'Work Order
Sheets("DOWNLOAD2").Range("B”).Value = ActiveCell.Offset(0, 3).Value 'Employee Name
Sheets("DOWNLOAD2").Range("C").Value = ActiveCell.Offset(0,4).Value 'Craft Code
Sheets("DOWNLOAD2").Range("L").Value = ActiveCell.Offset(0,13).Value 'Hours
<!--[if !supportLineBreakNewLine]-->
<!--[endif]-->
End If<o></o>
ActiveCell.Offset(1, 0).Select
Loop Until ActiveCell = 0
<o></o>
EndSub <o></o>