Results 1 to 4 of 4

Thread: help copying values from one sheet to another

  1. #1

    help copying values from one sheet to another



    Register for a FREE account, and/
    or Log in to avoid these ads!

    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
    Attached Files Attached Files

  2. #2
    Magician NoS's Avatar
    Join Date
    Jan 2013
    Location
    British Columbia
    Posts
    751
    Articles
    0
    Excel Version
    Excel 2010 64bit
    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.
    Another_try.xlsm

  3. #3
    Thankyou very much Nos . You have been a great help

  4. #4

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •