Hello,
I am having some trouble coming up with a code that does the following:
There is one sheet in wich people type some numbers every day, once the week is over, they delete the numbers from the previous week, change the dates and start recording the numbers for the next week.
What I need to do is to store the values from each week in a different tab, so we keep record of all the weeks.
I tryed to do that using the IF function, copying the values from the original sheet and pasting them into another sheet under the week that corresponds.
but I would have to do that with all the weeks, which makes it long and I beleive we can only use 7 IF functions together, and I need all the weeks in a year.
here is an example of the code I had:
If #6/18/2011# >= Date And #6/12/2011# < Date Then
Sheets("BAY-01").Select
Range("AK5:AK29").Select
Selection.Copy
Sheets("WeeklySummary").Select
Range("D7").Select
Selection.PasteSpecial (xlPasteValues)
End If
If #7/2/2011# >= Date And #6/19/2011# < Date Then
Sheets("BAY-01").Select
Range("AK5:AK29").Select
Selection.Copy
Sheets("WeeklySummary").Select
Range("G7").Select
Selection.PasteSpecial (xlPasteValues)
End If
I would really appreciate any comments or suggestions,
Thank you in advance!
I am having some trouble coming up with a code that does the following:
There is one sheet in wich people type some numbers every day, once the week is over, they delete the numbers from the previous week, change the dates and start recording the numbers for the next week.
What I need to do is to store the values from each week in a different tab, so we keep record of all the weeks.
I tryed to do that using the IF function, copying the values from the original sheet and pasting them into another sheet under the week that corresponds.
but I would have to do that with all the weeks, which makes it long and I beleive we can only use 7 IF functions together, and I need all the weeks in a year.
here is an example of the code I had:
If #6/18/2011# >= Date And #6/12/2011# < Date Then
Sheets("BAY-01").Select
Range("AK5:AK29").Select
Selection.Copy
Sheets("WeeklySummary").Select
Range("D7").Select
Selection.PasteSpecial (xlPasteValues)
End If
If #7/2/2011# >= Date And #6/19/2011# < Date Then
Sheets("BAY-01").Select
Range("AK5:AK29").Select
Selection.Copy
Sheets("WeeklySummary").Select
Range("G7").Select
Selection.PasteSpecial (xlPasteValues)
End If
I would really appreciate any comments or suggestions,
Thank you in advance!