help copying values from one sheet to another

helloakshay82

New member
Joined
May 31, 2015
Messages
2
Reaction score
0
Points
0
I have a file where sheet 3 has weekly targets. and sheet 4 has targets+actuals day wise.

All i want to do is copy targets day wise in to sheet 4

the user presses the button on sheet4 and gives a input of a queue name, it finds the q name first in sheet 3 and then should update the dates and rph and quality targets day wise in sheet 4.(example 0.33 rph for week 1, in sheet 4 it should update 0.33 for the 5 working days, and 0.44 for the next 5 working days for a particular queue

please note Few lines of where msg box is written is only to check the progress of the code this might be irrevalant when you are going through the code so please ignore them.

Any other info please let me know
 

Attachments

  • try.xlsm
    188.3 KB · Views: 12
You could replace what you have between Next I and End Select with this
Code:
Dim wk As Integer   'all declerations should be at the beginning of subs
Dim j As Integer

wk = 1
For j = 1 To tb6
    If j Mod 7 <> 0 And j Mod 7 <> 6 Then
    'it's not Sat or Sun
        Range("B" & j).Value = TP2.Offset(0, 2 * wk).Value
        Range("C" & j).Value = TP2.Offset(0, (2 * wk) + 1).Value
    Else
        If j Mod 7 = 0 Then wk = wk + 1
    End If
Next j

or have a look at your module 1 in the attached file.
View attachment Another_try.xlsm
 
Back
Top