Hey guys,
I am sure this is a very easy question to answer for most of you, but i just can t find the right code.
[vba]Private Sub CommandButton3_Click()
Dim StartTime As Date
Dim EndTime As Date
For i = 2 To 146 'end of the sheet1 team/name
For j = 3 To 15 'end of sheet1 dates
TempData = Worksheets("Sheet1").Cells(1, j) & Worksheets("Sheet1").Cells(i, 2)
k = 2
Do While Cells(k, 1) & Cells(k, 4) = TempData
StartTime = Cells(k, 5)
EndTime = Cells(k, 9)
Worksheets("Sheet1").Cells(i, j) = StartTime & "-" & EndTime
k = k + 1
Loop UNTIL k= 300
Next j
Next i
End Sub[/vba]
I need this thing to loops until k = 300,, but obviuosly is not the correct way to express it in VBA, if you could give me a tipp I would appreciate it.
I think, the way I wrote this code is not the most efficient way cause it takes like 10 min or even more for my pc to get the whole information which isn't that many. Could I send you my file, so you can look at it and have a better overview of the issue ?
So here is the thing. I would like to transform everything that is on Worksheets("Weekly") onto Worksheets("Sheet1"), so that is looks at the end, the way it looks in Worksheets("MyProgrammingGoal").
But this is what I ve gotten so far, please feel free to take a look in the attached File, I would appreciate every Help, advices, and comments.
I ve made comments to every Step that I ve written, Step 5) needs to be changed into a more efficient Code.