Link to home
Start Free TrialLog in
Avatar of gillesdiva
gillesdiva

asked on

[EXCEL] - Reference

hello all

I have a macro, called "test1", its name is "Module1" in Visual Basic Editor
I have another macro called "test2", its name is "Module11" in Visual Basic Editor

in "test1", I have these lines:

For i = intInitialValue To intFinalValue
j = i + 1


my question is,
For "test2" macro, "Module11", instead of redefine "i" & "j" again,
can i just say i = test1's i, and j = test1's j??

if so, how do i write the command?

thanx a lot

Avatar of pauloaguia
pauloaguia
Flag of Portugal image

What is it you are trying to do? Maybe there is someway to do that if you tell us why you need to do it.

Just as it is my answer would be No. You can't because they are separate procedures. But if test1 is calling test2 in it's code then it can pass the current values of i and j as arguments to that function (as long as the function is expecting them).

What do test1 and test2 do and why do you want to use information from one in the other (and if not very long, post both codes).

Paulo
Avatar of gillesdiva
gillesdiva

ASKER

it's actually very very long...
that is the reason why i had to split it into 2 macros...
cuz.. when i tried to run it, excel said it's too big to run.. that's why i spliited it up into 2...

so it's impossible to simply put " J = test1's definition of J" & "i = test1's definition of i" in test2??


Avatar of Dave
You should try pauloaguia's suggestion of passing the arguments.

I'm curious as to how big these macros are - I've never seen this error before. If its a macro that you recorded by tracing steps in excel then there is probably a lot of surplus code you could remove or tidy up
it's actually very very long...
that is the reason why i had to split it into 2 macros...
cuz.. when i tried to run it, excel said it's too big to run.. that's why i spliited it up into 2...

so it's impossible to simply put " J = test1's definition of J" & "i = test1's definition of i" in test2??


no, the thing is because there are so many steps, and i DID tidy up the macro's already...
 
no one has ever done this before??
i thought it's possible to do this since it's just referring to another macro's definition....
but if not, i guess i'll just have to think of another way then..
Sub Simple_ReplaceData()
   Dim wshSheet2           As Worksheet
   Dim intInitialValue     As Integer
   Dim intFinalValue       As Integer
   Dim i                   As Integer 'counter
   Dim int3P1Row        As Integer
   Dim int3P2Row        As Integer
   Dim int3P3Row        As Integer
   Dim int3P4Row        As Integer
   Dim int3P5Row        As Integer
   Dim int3P6Row        As Integer
   Dim int3P7Row        As Integer
   Dim int3P8Row        As Integer
   Dim int3P9Row        As Integer
   Dim int3P10Row        As Integer
   Dim int3P11Row        As Integer
   Dim int3P12Row        As Integer
   Dim int4P1Row        As Integer
   Dim int4P2Row        As Integer
   Dim int4P3Row        As Integer
   Dim int4P4Row        As Integer
   Dim int4P5Row        As Integer
   Dim int4P6Row        As Integer
   Dim int4P7Row        As Integer
   Dim int4P8Row        As Integer
   Dim int4P9Row        As Integer
   Dim int4P10Row        As Integer
   Dim int4P11Row        As Integer
   Dim int4P12Row        As Integer
   Dim int5P1Row        As Integer
   Dim int5P2Row        As Integer
   Dim int5P3Row        As Integer
   Dim int5P4Row        As Integer
   Dim int5P5Row        As Integer
   Dim int5P6Row        As Integer
   Dim int5P7Row        As Integer
   Dim int5P8Row        As Integer
   Dim int5P9Row        As Integer
   Dim int5P10Row        As Integer
   Dim int5P11Row        As Integer
   Dim int5P12Row        As Integer
   Dim int6P1Row        As Integer
   Dim int6P2Row        As Integer
   Dim int6P3Row        As Integer
   Dim int6P4Row        As Integer
   Dim int6P5Row        As Integer
   Dim int6P6Row        As Integer
   Dim int6P7Row        As Integer
   Dim int6P8Row        As Integer
   Dim int6P9Row        As Integer
   Dim int6P10Row        As Integer
   Dim int6P11Row        As Integer
   Dim int6P12Row        As Integer
   Dim int7P1Row        As Integer
   Dim int7P2Row        As Integer
   Dim int7P3Row        As Integer
   Dim int7P4Row        As Integer
   Dim int7P5Row        As Integer
   Dim int7P6Row        As Integer
   Dim int7P7Row        As Integer
   Dim int7P8Row        As Integer
   Dim int7P9Row        As Integer
   Dim int7P10Row        As Integer
   Dim int7P11Row        As Integer
   Dim int7P12Row        As Integer
   Dim btest   As Boolean
   Set wshSheet2 = ThisWorkbook.Sheets("Sheet2")
   
   intInitialValue = CInt(InputBox("Initial Value:"))
   intFinalValue = CInt(InputBox("Final Value:"))
   int3P1Row = 2
   int3P2Row = 2
   int3P3Row = 2
   int3P4Row = 2
   int3P5Row = 2
   int3P6Row = 2
   int3P7Row = 2
   int3P8Row = 2
   int3P9Row = 2
   int3P10Row = 2
   int3P11Row = 2
   int3P12Row = 2
   int4P1Row = 2
   int4P2Row = 2
   int4P3Row = 2
   int4P4Row = 2
   int4P5Row = 2
   int4P6Row = 2
   int4P7Row = 2
   int4P8Row = 2
   int4P9Row = 2
   int4P10Row = 2
   int4P11Row = 2
   int4P12Row = 2
   int5P1Row = 2
   int5P2Row = 2
   int5P3Row = 2
   int5P4Row = 2
   int5P5Row = 2
   int5P6Row = 2
   int5P7Row = 2
   int5P8Row = 2
   int5P9Row = 2
   int5P10Row = 2
   int5P11Row = 2
   int5P12Row = 2
   int6P1Row = 2
   int6P2Row = 2
   int6P3Row = 2
   int6P4Row = 2
   int6P5Row = 2
   int6P6Row = 2
   int6P7Row = 2
   int6P8Row = 2
   int6P9Row = 2
   int6P10Row = 2
   int6P11Row = 2
   int6P12Row = 2
   int7P1Row = 2
   int7P2Row = 2
   int7P3Row = 2
   int7P4Row = 2
   int7P5Row = 2
   int7P6Row = 2
   int7P7Row = 2
   int7P8Row = 2
   int7P9Row = 2
   int7P10Row = 2
   int7P11Row = 2
   int7P12Row = 2

   For i = intInitialValue To intFinalValue
       
    '   Application.Run "Simple_ab"
       
    j = i + 1
   
    Range("H:M").Select

    Selection.Replace i, _
        Replacement:=j, _
        LookAt:=xlPart, _
        SearchOrder:=xlByRows, _
        MatchCase:=False
       
       
       
       wshSheet2.Columns("H:M").Replace What:=i, Replacement:=i + 1, LookAt:=xlWhole, _
        SearchOrder:=xlByRows, MatchCase:=False
       
       Application.Run "Simple_aa"

 
   















       If wshSheet2.Range("O4").Value = "33" Then
           wshSheet2.Select
           wshSheet2.Range("P3:U3").Copy
           Sheets("3P1").Select
           Sheets("3P1").Cells(int3P1Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("3P1").Cells(int3P1Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("P4:U4").Copy
           Sheets("3P1").Select
           Sheets("3P1").Cells(int3P1Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("3P1").Cells(int3P1Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P5:U5").Copy
           Sheets("3P1").Select
           Sheets("3P1").Cells(int3P1Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("3P1").Cells(int3P1Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P6:U6").Copy
           Sheets("3P1").Select
           Sheets("3P1").Cells(int3P1Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("3P1").Cells(int3P1Row, 37).Value = j 'Changed value in D column
           int3P1Row = int3P1Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
       End If
   
       If wshSheet2.Range("O11").Value = "33" Then
           wshSheet2.Select
           wshSheet2.Range("P10:U10").Copy
           Sheets("3P2").Select
           Sheets("3P2").Cells(int3P2Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("3P2").Cells(int3P2Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P11:U11").Copy
           Sheets("3P2").Select
           Sheets("3P2").Cells(int3P2Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("3P2").Cells(int3P2Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P12:U12").Copy
           Sheets("3P2").Select
           Sheets("3P2").Cells(int3P2Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("3P2").Cells(int3P2Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P13:U13").Copy
           Sheets("3P2").Select
           Sheets("3P2").Cells(int3P2Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("3P2").Cells(int3P2Row, 37).Value = j 'Changed value in D column
           int3P2Row = int3P2Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
       End If
 
 
       If wshSheet2.Range("O18").Value = "33" Then
           wshSheet2.Select
           wshSheet2.Range("P17:U17").Copy
           Sheets("3P3").Select
           Sheets("3P3").Cells(int3P3Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("3P3").Cells(int3P3Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
          wshSheet2.Select
           wshSheet2.Range("P18:U18").Copy
           Sheets("3P3").Select
           Sheets("3P3").Cells(int3P3Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("3P3").Cells(int3P3Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
          wshSheet2.Select
           wshSheet2.Range("P19:U19").Copy
           Sheets("3P3").Select
           Sheets("3P3").Cells(int3P3Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("3P3").Cells(int3P3Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
          wshSheet2.Select
           wshSheet2.Range("P20:U20").Copy
           Sheets("3P3").Select
           Sheets("3P3").Cells(int3P3Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("3P3").Cells(int3P3Row, 37).Value = j 'Changed value in D column
           int3P3Row = int3P3Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
       End If
 
       If wshSheet2.Range("O25").Value = "33" Then
           wshSheet2.Select
           wshSheet2.Range("P24:U24").Copy
           Sheets("3P4").Select
           Sheets("3P4").Cells(int3P4Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("3P4").Cells(int3P4Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P25:U25").Copy
           Sheets("3P4").Select
           Sheets("3P4").Cells(int3P4Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("3P4").Cells(int3P4Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("P26:U26").Copy
           Sheets("3P4").Select
           Sheets("3P4").Cells(int3P4Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("3P4").Cells(int3P4Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("P27:U27").Copy
           Sheets("3P4").Select
           Sheets("3P4").Cells(int3P4Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("3P4").Cells(int3P4Row, 37).Value = j 'Changed value in D column
           int3P4Row = int3P4Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
       End If
 
       If wshSheet2.Range("O32").Value = "33" Then
           wshSheet2.Select
           wshSheet2.Range("P31:U31").Copy
           Sheets("3P5").Select
           Sheets("3P5").Cells(int3P5Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("3P5").Cells(int3P5Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("P32:U32").Copy
           Sheets("3P5").Select
           Sheets("3P5").Cells(int3P5Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("3P5").Cells(int3P5Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P33:U33").Copy
           Sheets("3P5").Select
           Sheets("3P5").Cells(int3P5Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("3P5").Cells(int3P5Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P34:U34").Copy
           Sheets("3P5").Select
           Sheets("3P5").Cells(int3P5Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("3P5").Cells(int3P5Row, 37).Value = j 'Changed value in D column
           int3P5Row = int3P5Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select


       End If
 
       If wshSheet2.Range("O39").Value = "33" Then
           wshSheet2.Select
           wshSheet2.Range("P38:U38").Copy
           Sheets("3P6").Select
           Sheets("3P6").Cells(int3P6Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("3P6").Cells(int3P6Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P39:U39").Copy
           Sheets("3P6").Select
           Sheets("3P6").Cells(int3P6Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("3P6").Cells(int3P6Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P40:U40").Copy
           Sheets("3P6").Select
           Sheets("3P6").Cells(int3P6Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("3P6").Cells(int3P6Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P41:U41").Copy
           Sheets("3P6").Select
           Sheets("3P6").Cells(int3P6Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("3P6").Cells(int3P6Row, 37).Value = j 'Changed value in D column
           int3P6Row = int3P6Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select


       End If
       
       If wshSheet2.Range("X4").Value = "33" Then
           wshSheet2.Select
           wshSheet2.Range("Y3:AD3").Copy
           Sheets("3P7").Select
           Sheets("3P7").Cells(int3P7Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("3P7").Cells(int3P7Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y4:AD4").Copy
           Sheets("3P7").Select
           Sheets("3P7").Cells(int3P7Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("3P7").Cells(int3P7Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y5:AD5").Copy
           Sheets("3P7").Select
           Sheets("3P7").Cells(int3P7Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("3P7").Cells(int3P7Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y6:AD6").Copy
           Sheets("3P7").Select
           Sheets("3P7").Cells(int3P7Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("3P7").Cells(int3P7Row, 37).Value = j 'Changed value in D column
           int3P7Row = int3P7Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           

       End If
   
       If wshSheet2.Range("X11").Value = "33" Then
           wshSheet2.Select
           wshSheet2.Range("Y10:AD10").Copy
           Sheets("3P8").Select
           Sheets("3P8").Cells(int3P8Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("3P8").Cells(int3P8Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y11:AD11").Copy
           Sheets("3P8").Select
           Sheets("3P8").Cells(int3P8Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("3P8").Cells(int3P8Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y12:AD12").Copy
           Sheets("3P8").Select
           Sheets("3P8").Cells(int3P8Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("3P8").Cells(int3P8Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y13:AD13").Copy
           Sheets("3P8").Select
           Sheets("3P8").Cells(int3P8Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("3P8").Cells(int3P8Row, 37).Value = j 'Changed value in D column
           int3P8Row = int3P8Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select


       End If
 
 
       If wshSheet2.Range("X18").Value = "33" Then
           wshSheet2.Select
           wshSheet2.Range("Y17:AD17").Copy
           Sheets("3P9").Select
           Sheets("3P9").Cells(int3P9Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("3P9").Cells(int3P9Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y18:AD18").Copy
           Sheets("3P9").Select
           Sheets("3P9").Cells(int3P9Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("3P9").Cells(int3P9Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y19:AD19").Copy
           Sheets("3P9").Select
           Sheets("3P9").Cells(int3P9Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("3P9").Cells(int3P9Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y20:AD20").Copy
           Sheets("3P9").Select
           Sheets("3P9").Cells(int3P9Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("3P9").Cells(int3P9Row, 37).Value = j 'Changed value in D column
           int3P9Row = int3P9Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select


       End If
 
       If wshSheet2.Range("X25").Value = "33" Then
           wshSheet2.Select
           wshSheet2.Range("Y24:AD24").Copy
           Sheets("3P10").Select
           Sheets("3P10").Cells(int3P10Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("3P10").Cells(int3P10Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y25:AD25").Copy
           Sheets("3P10").Select
           Sheets("3P10").Cells(int3P10Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("3P10").Cells(int3P10Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y26:AD26").Copy
           Sheets("3P10").Select
           Sheets("3P10").Cells(int3P10Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("3P10").Cells(int3P10Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y27:AD27").Copy
           Sheets("3P10").Select
           Sheets("3P10").Cells(int3P10Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("3P10").Cells(int3P10Row, 37).Value = j 'Changed value in D column
           int3P10Row = int3P10Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select


       End If
 
       If wshSheet2.Range("X32").Value = "33" Then
           wshSheet2.Select
           wshSheet2.Range("Y31:AD31").Copy
           Sheets("3P11").Select
           Sheets("3P11").Cells(int3P11Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("3P11").Cells(int3P11Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y32:AD32").Copy
           Sheets("3P11").Select
           Sheets("3P11").Cells(int3P11Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("3P11").Cells(int3P11Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y33:AD33").Copy
           Sheets("3P11").Select
           Sheets("3P11").Cells(int3P11Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("3P11").Cells(int3P11Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y34:AD34").Copy
           Sheets("3P11").Select
           Sheets("3P11").Cells(int3P11Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("3P11").Cells(int3P11Row, 37).Value = j 'Changed value in D column
           int3P11Row = int3P11Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           

       End If
 
       If wshSheet2.Range("X39").Value = "33" Then
           wshSheet2.Select
           wshSheet2.Range("Y38:AD38").Copy
           Sheets("3P12").Select
           Sheets("3P12").Cells(int3P12Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("3P12").Cells(int3P12Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y39:AD39").Copy
           Sheets("3P12").Select
           Sheets("3P12").Cells(int3P12Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("3P12").Cells(int3P12Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y40:AD40").Copy
           Sheets("3P12").Select
           Sheets("3P12").Cells(int3P12Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("3P12").Cells(int3P12Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y41:AD41").Copy
           Sheets("3P12").Select
           Sheets("3P12").Cells(int3P12Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("3P12").Cells(int3P12Row, 37).Value = j 'Changed value in D column
           int3P12Row = int3P12Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
       End If





























   
       If wshSheet2.Range("O5").Value = "44" Then
           wshSheet2.Select
           wshSheet2.Range("P3:U3").Copy
           Sheets("4P1").Select
           Sheets("4P1").Cells(int4P1Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("4P1").Cells(int4P1Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("P4:U4").Copy
           Sheets("4P1").Select
           Sheets("4P1").Cells(int4P1Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("4P1").Cells(int4P1Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P5:U5").Copy
           Sheets("4P1").Select
           Sheets("4P1").Cells(int4P1Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("4P1").Cells(int4P1Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P6:U6").Copy
           Sheets("4P1").Select
           Sheets("4P1").Cells(int4P1Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("4P1").Cells(int4P1Row, 37).Value = j 'Changed value in D column
           int4P1Row = int4P1Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
       End If
   
       If wshSheet2.Range("O12").Value = "44" Then
           wshSheet2.Select
           wshSheet2.Range("P10:U10").Copy
           Sheets("4P2").Select
           Sheets("4P2").Cells(int4P2Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("4P2").Cells(int4P2Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P11:U11").Copy
           Sheets("4P2").Select
           Sheets("4P2").Cells(int4P2Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("4P2").Cells(int4P2Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P12:U12").Copy
           Sheets("4P2").Select
           Sheets("4P2").Cells(int4P2Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("4P2").Cells(int4P2Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P13:U13").Copy
           Sheets("4P2").Select
           Sheets("4P2").Cells(int4P2Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("4P2").Cells(int4P2Row, 37).Value = j 'Changed value in D column
           int4P2Row = int4P2Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
       End If
 
 
       If wshSheet2.Range("O19").Value = "44" Then
           wshSheet2.Select
           wshSheet2.Range("P17:U17").Copy
           Sheets("4P3").Select
           Sheets("4P3").Cells(int4P3Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("4P3").Cells(int4P3Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
          wshSheet2.Select
           wshSheet2.Range("P18:U18").Copy
           Sheets("4P3").Select
           Sheets("4P3").Cells(int4P3Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("4P3").Cells(int4P3Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
          wshSheet2.Select
           wshSheet2.Range("P19:U19").Copy
           Sheets("4P3").Select
           Sheets("4P3").Cells(int4P3Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("4P3").Cells(int4P3Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
          wshSheet2.Select
           wshSheet2.Range("P20:U20").Copy
           Sheets("4P3").Select
           Sheets("4P3").Cells(int4P3Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("4P3").Cells(int4P3Row, 37).Value = j 'Changed value in D column
           int4P3Row = int4P3Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
       End If
 
       If wshSheet2.Range("O26").Value = "44" Then
           wshSheet2.Select
           wshSheet2.Range("P24:U24").Copy
           Sheets("4P4").Select
           Sheets("4P4").Cells(int4P4Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("4P4").Cells(int4P4Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P25:U25").Copy
           Sheets("4P4").Select
           Sheets("4P4").Cells(int4P4Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("4P4").Cells(int4P4Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("P26:U26").Copy
           Sheets("4P4").Select
           Sheets("4P4").Cells(int4P4Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("4P4").Cells(int4P4Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("P27:U27").Copy
           Sheets("4P4").Select
           Sheets("4P4").Cells(int4P4Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("4P4").Cells(int4P4Row, 37).Value = j 'Changed value in D column
           int4P4Row = int4P4Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
       End If
 
       If wshSheet2.Range("O33").Value = "44" Then
           wshSheet2.Select
           wshSheet2.Range("P31:U31").Copy
           Sheets("4P5").Select
           Sheets("4P5").Cells(int4P5Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("4P5").Cells(int4P5Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("P32:U32").Copy
           Sheets("4P5").Select
           Sheets("4P5").Cells(int4P5Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("4P5").Cells(int4P5Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P33:U33").Copy
           Sheets("4P5").Select
           Sheets("4P5").Cells(int4P5Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("4P5").Cells(int4P5Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P34:U34").Copy
           Sheets("4P5").Select
           Sheets("4P5").Cells(int4P5Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("4P5").Cells(int4P5Row, 37).Value = j 'Changed value in D column
           int4P5Row = int4P5Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select


       End If
 
       If wshSheet2.Range("O40").Value = "44" Then
           wshSheet2.Select
           wshSheet2.Range("P38:U38").Copy
           Sheets("4P6").Select
           Sheets("4P6").Cells(int4P6Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("4P6").Cells(int4P6Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P39:U39").Copy
           Sheets("4P6").Select
           Sheets("4P6").Cells(int4P6Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("4P6").Cells(int4P6Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P40:U40").Copy
           Sheets("4P6").Select
           Sheets("4P6").Cells(int4P6Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("4P6").Cells(int4P6Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P41:U41").Copy
           Sheets("4P6").Select
           Sheets("4P6").Cells(int4P6Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("4P6").Cells(int4P6Row, 37).Value = j 'Changed value in D column
           int4P6Row = int4P6Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select


       End If
       
       If wshSheet2.Range("X5").Value = "44" Then
           wshSheet2.Select
           wshSheet2.Range("Y3:AD3").Copy
           Sheets("4P7").Select
           Sheets("4P7").Cells(int4P7Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("4P7").Cells(int4P7Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y4:AD4").Copy
           Sheets("4P7").Select
           Sheets("4P7").Cells(int4P7Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("4P7").Cells(int4P7Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y5:AD5").Copy
           Sheets("4P7").Select
           Sheets("4P7").Cells(int4P7Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("4P7").Cells(int4P7Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y6:AD6").Copy
           Sheets("4P7").Select
           Sheets("4P7").Cells(int4P7Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("4P7").Cells(int4P7Row, 37).Value = j 'Changed value in D column
           int4P7Row = int4P7Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           

       End If
   
       If wshSheet2.Range("X12").Value = "44" Then
           wshSheet2.Select
           wshSheet2.Range("Y10:AD10").Copy
           Sheets("4P8").Select
           Sheets("4P8").Cells(int4P8Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("4P8").Cells(int4P8Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y11:AD11").Copy
           Sheets("4P8").Select
           Sheets("4P8").Cells(int4P8Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("4P8").Cells(int4P8Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y12:AD12").Copy
           Sheets("4P8").Select
           Sheets("4P8").Cells(int4P8Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("4P8").Cells(int4P8Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y13:AD13").Copy
           Sheets("4P8").Select
           Sheets("4P8").Cells(int4P8Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("4P8").Cells(int4P8Row, 37).Value = j 'Changed value in D column
           int4P8Row = int4P8Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select


       End If
 
 
       If wshSheet2.Range("X19").Value = "44" Then
           wshSheet2.Select
           wshSheet2.Range("Y17:AD17").Copy
           Sheets("4P9").Select
           Sheets("4P9").Cells(int4P9Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("4P9").Cells(int4P9Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y18:AD18").Copy
           Sheets("4P9").Select
           Sheets("4P9").Cells(int4P9Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("4P9").Cells(int4P9Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y19:AD19").Copy
           Sheets("4P9").Select
           Sheets("4P9").Cells(int4P9Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("4P9").Cells(int4P9Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y20:AD20").Copy
           Sheets("4P9").Select
           Sheets("4P9").Cells(int4P9Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("4P9").Cells(int4P9Row, 37).Value = j 'Changed value in D column
           int4P9Row = int4P9Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select


       End If
 
       If wshSheet2.Range("X26").Value = "44" Then
           wshSheet2.Select
           wshSheet2.Range("Y24:AD24").Copy
           Sheets("4P10").Select
           Sheets("4P10").Cells(int4P10Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("4P10").Cells(int4P10Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y25:AD25").Copy
           Sheets("4P10").Select
           Sheets("4P10").Cells(int4P10Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("4P10").Cells(int4P10Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y26:AD26").Copy
           Sheets("4P10").Select
           Sheets("4P10").Cells(int4P10Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("4P10").Cells(int4P10Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y27:AD27").Copy
           Sheets("4P10").Select
           Sheets("4P10").Cells(int4P10Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("4P10").Cells(int4P10Row, 37).Value = j 'Changed value in D column
           int4P10Row = int4P10Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select


       End If
 
       If wshSheet2.Range("X33").Value = "44" Then
           wshSheet2.Select
           wshSheet2.Range("Y31:AD31").Copy
           Sheets("4P11").Select
           Sheets("4P11").Cells(int4P11Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("4P11").Cells(int4P11Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y32:AD32").Copy
           Sheets("4P11").Select
           Sheets("4P11").Cells(int4P11Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("4P11").Cells(int4P11Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y33:AD33").Copy
           Sheets("4P11").Select
           Sheets("4P11").Cells(int4P11Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("4P11").Cells(int4P11Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y34:AD34").Copy
           Sheets("4P11").Select
           Sheets("4P11").Cells(int4P11Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("4P11").Cells(int4P11Row, 37).Value = j 'Changed value in D column
           int4P11Row = int4P11Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           

       End If
 
       If wshSheet2.Range("X40").Value = "44" Then
           wshSheet2.Select
           wshSheet2.Range("Y38:AD38").Copy
           Sheets("4P12").Select
           Sheets("4P12").Cells(int4P12Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("4P12").Cells(int4P12Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y39:AD39").Copy
           Sheets("4P12").Select
           Sheets("4P12").Cells(int4P12Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("4P12").Cells(int4P12Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y40:AD40").Copy
           Sheets("4P12").Select
           Sheets("4P12").Cells(int4P12Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("4P12").Cells(int4P12Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y41:AD41").Copy
           Sheets("4P12").Select
           Sheets("4P12").Cells(int4P12Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("4P12").Cells(int4P12Row, 37).Value = j 'Changed value in D column
           int4P12Row = int4P12Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select


       End If






























       If wshSheet2.Range("N3").Value = "55" Then
           wshSheet2.Select
           wshSheet2.Range("P3:U3").Copy
           Sheets("5P1").Select
           Sheets("5P1").Cells(int5P1Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("5P1").Cells(int5P1Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("P4:U4").Copy
           Sheets("5P1").Select
           Sheets("5P1").Cells(int5P1Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("5P1").Cells(int5P1Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P5:U5").Copy
           Sheets("5P1").Select
           Sheets("5P1").Cells(int5P1Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("5P1").Cells(int5P1Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P6:U6").Copy
           Sheets("5P1").Select
           Sheets("5P1").Cells(int5P1Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("5P1").Cells(int5P1Row, 37).Value = j 'Changed value in D column
           int5P1Row = int5P1Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
       End If
   
       If wshSheet2.Range("N10").Value = "55" Then
           wshSheet2.Select
           wshSheet2.Range("P10:U10").Copy
           Sheets("5P2").Select
           Sheets("5P2").Cells(int5P2Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("5P2").Cells(int5P2Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P11:U11").Copy
           Sheets("5P2").Select
           Sheets("5P2").Cells(int5P2Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("5P2").Cells(int5P2Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P12:U12").Copy
           Sheets("5P2").Select
           Sheets("5P2").Cells(int5P2Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("5P2").Cells(int5P2Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P13:U13").Copy
           Sheets("5P2").Select
           Sheets("5P2").Cells(int5P2Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("5P2").Cells(int5P2Row, 37).Value = j 'Changed value in D column
           int5P2Row = int5P2Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
       End If
 
 
       If wshSheet2.Range("N17").Value = "55" Then
           wshSheet2.Select
           wshSheet2.Range("P17:U17").Copy
           Sheets("5P3").Select
           Sheets("5P3").Cells(int5P3Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("5P3").Cells(int5P3Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
          wshSheet2.Select
           wshSheet2.Range("P18:U18").Copy
           Sheets("5P3").Select
           Sheets("5P3").Cells(int5P3Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("5P3").Cells(int5P3Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
          wshSheet2.Select
           wshSheet2.Range("P19:U19").Copy
           Sheets("5P3").Select
           Sheets("5P3").Cells(int5P3Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("5P3").Cells(int5P3Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
          wshSheet2.Select
           wshSheet2.Range("P20:U20").Copy
           Sheets("5P3").Select
           Sheets("5P3").Cells(int5P3Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("5P3").Cells(int5P3Row, 37).Value = j 'Changed value in D column
           int5P3Row = int5P3Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
       End If
 
       If wshSheet2.Range("N24").Value = "55" Then
           wshSheet2.Select
           wshSheet2.Range("P24:U24").Copy
           Sheets("5P4").Select
           Sheets("5P4").Cells(int5P4Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("5P4").Cells(int5P4Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P25:U25").Copy
           Sheets("5P4").Select
           Sheets("5P4").Cells(int5P4Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("5P4").Cells(int5P4Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("P26:U26").Copy
           Sheets("5P4").Select
           Sheets("5P4").Cells(int5P4Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("5P4").Cells(int5P4Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("P27:U27").Copy
           Sheets("5P4").Select
           Sheets("5P4").Cells(int5P4Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("5P4").Cells(int5P4Row, 37).Value = j 'Changed value in D column
           int5P4Row = int5P4Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
       End If
 
       If wshSheet2.Range("N31").Value = "55" Then
           wshSheet2.Select
           wshSheet2.Range("P31:U31").Copy
           Sheets("5P5").Select
           Sheets("5P5").Cells(int5P5Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("5P5").Cells(int5P5Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("P32:U32").Copy
           Sheets("5P5").Select
           Sheets("5P5").Cells(int5P5Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("5P5").Cells(int5P5Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P33:U33").Copy
           Sheets("5P5").Select
           Sheets("5P5").Cells(int5P5Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("5P5").Cells(int5P5Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P34:U34").Copy
           Sheets("5P5").Select
           Sheets("5P5").Cells(int5P5Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("5P5").Cells(int5P5Row, 37).Value = j 'Changed value in D column
           int5P5Row = int5P5Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select


       End If
 
       If wshSheet2.Range("N38").Value = "55" Then
           wshSheet2.Select
           wshSheet2.Range("P38:U38").Copy
           Sheets("5P6").Select
           Sheets("5P6").Cells(int5P6Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("5P6").Cells(int5P6Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P39:U39").Copy
           Sheets("5P6").Select
           Sheets("5P6").Cells(int5P6Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("5P6").Cells(int5P6Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P40:U40").Copy
           Sheets("5P6").Select
           Sheets("5P6").Cells(int5P6Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("5P6").Cells(int5P6Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P41:U41").Copy
           Sheets("5P6").Select
           Sheets("5P6").Cells(int5P6Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("5P6").Cells(int5P6Row, 37).Value = j 'Changed value in D column
           int5P6Row = int5P6Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select


       End If
       
       If wshSheet2.Range("W3").Value = "55" Then
           wshSheet2.Select
           wshSheet2.Range("Y3:AD3").Copy
           Sheets("5P7").Select
           Sheets("5P7").Cells(int5P7Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("5P7").Cells(int5P7Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y4:AD4").Copy
           Sheets("5P7").Select
           Sheets("5P7").Cells(int5P7Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("5P7").Cells(int5P7Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y5:AD5").Copy
           Sheets("5P7").Select
           Sheets("5P7").Cells(int5P7Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("5P7").Cells(int5P7Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y6:AD6").Copy
           Sheets("5P7").Select
           Sheets("5P7").Cells(int5P7Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("5P7").Cells(int5P7Row, 37).Value = j 'Changed value in D column
           int5P7Row = int5P7Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           

       End If
   
       If wshSheet2.Range("W10").Value = "55" Then
           wshSheet2.Select
           wshSheet2.Range("Y10:AD10").Copy
           Sheets("5P8").Select
           Sheets("5P8").Cells(int5P8Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("5P8").Cells(int5P8Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y11:AD11").Copy
           Sheets("5P8").Select
           Sheets("5P8").Cells(int5P8Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("5P8").Cells(int5P8Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y12:AD12").Copy
           Sheets("5P8").Select
           Sheets("5P8").Cells(int5P8Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("5P8").Cells(int5P8Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y13:AD13").Copy
           Sheets("5P8").Select
           Sheets("5P8").Cells(int5P8Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("5P8").Cells(int5P8Row, 37).Value = j 'Changed value in D column
           int5P8Row = int5P8Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select


       End If
 
 
       If wshSheet2.Range("W17").Value = "55" Then
           wshSheet2.Select
           wshSheet2.Range("Y17:AD17").Copy
           Sheets("5P9").Select
           Sheets("5P9").Cells(int5P9Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("5P9").Cells(int5P9Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y18:AD18").Copy
           Sheets("5P9").Select
           Sheets("5P9").Cells(int5P9Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("5P9").Cells(int5P9Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y19:AD19").Copy
           Sheets("5P9").Select
           Sheets("5P9").Cells(int5P9Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("5P9").Cells(int5P9Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y20:AD20").Copy
           Sheets("5P9").Select
           Sheets("5P9").Cells(int5P9Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("5P9").Cells(int5P9Row, 37).Value = j 'Changed value in D column
           int5P9Row = int5P9Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select


       End If
 
       If wshSheet2.Range("W24").Value = "55" Then
           wshSheet2.Select
           wshSheet2.Range("Y24:AD24").Copy
           Sheets("5P10").Select
           Sheets("5P10").Cells(int5P10Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("5P10").Cells(int5P10Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y25:AD25").Copy
           Sheets("5P10").Select
           Sheets("5P10").Cells(int5P10Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("5P10").Cells(int5P10Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y26:AD26").Copy
           Sheets("5P10").Select
           Sheets("5P10").Cells(int5P10Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("5P10").Cells(int5P10Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y27:AD27").Copy
           Sheets("5P10").Select
           Sheets("5P10").Cells(int5P10Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("5P10").Cells(int5P10Row, 37).Value = j 'Changed value in D column
           int5P10Row = int5P10Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select


       End If
 
       If wshSheet2.Range("W31").Value = "55" Then
           wshSheet2.Select
           wshSheet2.Range("Y31:AD31").Copy
           Sheets("5P11").Select
           Sheets("5P11").Cells(int5P11Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("5P11").Cells(int5P11Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y32:AD32").Copy
           Sheets("5P11").Select
           Sheets("5P11").Cells(int5P11Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("5P11").Cells(int5P11Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y33:AD33").Copy
           Sheets("5P11").Select
           Sheets("5P11").Cells(int5P11Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("5P11").Cells(int5P11Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y34:AD34").Copy
           Sheets("5P11").Select
           Sheets("5P11").Cells(int5P11Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("5P11").Cells(int5P11Row, 37).Value = j 'Changed value in D column
           int5P11Row = int5P11Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           

       End If
 
       If wshSheet2.Range("W38").Value = "55" Then
           wshSheet2.Select
           wshSheet2.Range("Y38:AD38").Copy
           Sheets("5P12").Select
           Sheets("5P12").Cells(int5P12Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("5P12").Cells(int5P12Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y39:AD39").Copy
           Sheets("5P12").Select
           Sheets("5P12").Cells(int5P12Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("5P12").Cells(int5P12Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y40:AD40").Copy
           Sheets("5P12").Select
           Sheets("5P12").Cells(int5P12Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("5P12").Cells(int5P12Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y41:AD41").Copy
           Sheets("5P12").Select
           Sheets("5P12").Cells(int5P12Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("5P12").Cells(int5P12Row, 37).Value = j 'Changed value in D column
           int5P12Row = int5P12Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           

       End If
































       If wshSheet2.Range("N4").Value = "66" Then
           wshSheet2.Select
           wshSheet2.Range("P3:U3").Copy
           Sheets("6P1").Select
           Sheets("6P1").Cells(int6P1Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("6P1").Cells(int6P1Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("P4:U4").Copy
           Sheets("6P1").Select
           Sheets("6P1").Cells(int6P1Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("6P1").Cells(int6P1Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P5:U5").Copy
           Sheets("6P1").Select
           Sheets("6P1").Cells(int6P1Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("6P1").Cells(int6P1Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P6:U6").Copy
           Sheets("6P1").Select
           Sheets("6P1").Cells(int6P1Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("6P1").Cells(int6P1Row, 37).Value = j 'Changed value in D column
           int6P1Row = int6P1Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
       End If
   
       If wshSheet2.Range("N11").Value = "66" Then
           wshSheet2.Select
           wshSheet2.Range("P10:U10").Copy
           Sheets("6P2").Select
           Sheets("6P2").Cells(int6P2Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("6P2").Cells(int6P2Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P11:U11").Copy
           Sheets("6P2").Select
           Sheets("6P2").Cells(int6P2Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("6P2").Cells(int6P2Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P12:U12").Copy
           Sheets("6P2").Select
           Sheets("6P2").Cells(int6P2Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("6P2").Cells(int6P2Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P13:U13").Copy
           Sheets("6P2").Select
           Sheets("6P2").Cells(int6P2Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("6P2").Cells(int6P2Row, 37).Value = j 'Changed value in D column
           int6P2Row = int6P2Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
       End If
 
 
       If wshSheet2.Range("N18").Value = "66" Then
           wshSheet2.Select
           wshSheet2.Range("P17:U17").Copy
           Sheets("6P3").Select
           Sheets("6P3").Cells(int6P3Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("6P3").Cells(int6P3Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
          wshSheet2.Select
           wshSheet2.Range("P18:U18").Copy
           Sheets("6P3").Select
           Sheets("6P3").Cells(int6P3Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("6P3").Cells(int6P3Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
          wshSheet2.Select
           wshSheet2.Range("P19:U19").Copy
           Sheets("6P3").Select
           Sheets("6P3").Cells(int6P3Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("6P3").Cells(int6P3Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
          wshSheet2.Select
           wshSheet2.Range("P20:U20").Copy
           Sheets("6P3").Select
           Sheets("6P3").Cells(int6P3Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("6P3").Cells(int6P3Row, 37).Value = j 'Changed value in D column
           int6P3Row = int6P3Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
       End If
 
       If wshSheet2.Range("N25").Value = "66" Then
           wshSheet2.Select
           wshSheet2.Range("P24:U24").Copy
           Sheets("6P4").Select
           Sheets("6P4").Cells(int6P4Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("6P4").Cells(int6P4Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P25:U25").Copy
           Sheets("6P4").Select
           Sheets("6P4").Cells(int6P4Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("6P4").Cells(int6P4Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("P26:U26").Copy
           Sheets("6P4").Select
           Sheets("6P4").Cells(int6P4Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("6P4").Cells(int6P4Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("P27:U27").Copy
           Sheets("6P4").Select
           Sheets("6P4").Cells(int6P4Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("6P4").Cells(int6P4Row, 37).Value = j 'Changed value in D column
           int6P4Row = int6P4Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
       End If
 
       If wshSheet2.Range("N32").Value = "66" Then
           wshSheet2.Select
           wshSheet2.Range("P31:U31").Copy
           Sheets("6P5").Select
           Sheets("6P5").Cells(int6P5Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("6P5").Cells(int6P5Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("P32:U32").Copy
           Sheets("6P5").Select
           Sheets("6P5").Cells(int6P5Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("6P5").Cells(int6P5Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P33:U33").Copy
           Sheets("6P5").Select
           Sheets("6P5").Cells(int6P5Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("6P5").Cells(int6P5Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P34:U34").Copy
           Sheets("6P5").Select
           Sheets("6P5").Cells(int6P5Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("6P5").Cells(int6P5Row, 37).Value = j 'Changed value in D column
           int6P5Row = int6P5Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select


       End If
 
       If wshSheet2.Range("N39").Value = "66" Then
           wshSheet2.Select
           wshSheet2.Range("P38:U38").Copy
           Sheets("6P6").Select
           Sheets("6P6").Cells(int6P6Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("6P6").Cells(int6P6Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P39:U39").Copy
           Sheets("6P6").Select
           Sheets("6P6").Cells(int6P6Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("6P6").Cells(int6P6Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P40:U40").Copy
           Sheets("6P6").Select
           Sheets("6P6").Cells(int6P6Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("6P6").Cells(int6P6Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P41:U41").Copy
           Sheets("6P6").Select
           Sheets("6P6").Cells(int6P6Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("6P6").Cells(int6P6Row, 37).Value = j 'Changed value in D column
           int6P6Row = int6P6Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select


       End If
       
       If wshSheet2.Range("W4").Value = "66" Then
           wshSheet2.Select
           wshSheet2.Range("Y3:AD3").Copy
           Sheets("6P7").Select
           Sheets("6P7").Cells(int6P7Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("6P7").Cells(int6P7Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y4:AD4").Copy
           Sheets("6P7").Select
           Sheets("6P7").Cells(int6P7Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("6P7").Cells(int6P7Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y5:AD5").Copy
           Sheets("6P7").Select
           Sheets("6P7").Cells(int6P7Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("6P7").Cells(int6P7Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y6:AD6").Copy
           Sheets("6P7").Select
           Sheets("6P7").Cells(int6P7Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("6P7").Cells(int6P7Row, 37).Value = j 'Changed value in D column
           int6P7Row = int6P7Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           

       End If
   
       If wshSheet2.Range("W11").Value = "66" Then
           wshSheet2.Select
           wshSheet2.Range("Y10:AD10").Copy
           Sheets("6P8").Select
           Sheets("6P8").Cells(int6P8Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("6P8").Cells(int6P8Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y11:AD11").Copy
           Sheets("6P8").Select
           Sheets("6P8").Cells(int6P8Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("6P8").Cells(int6P8Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y12:AD12").Copy
           Sheets("6P8").Select
           Sheets("6P8").Cells(int6P8Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("6P8").Cells(int6P8Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y13:AD13").Copy
           Sheets("6P8").Select
           Sheets("6P8").Cells(int6P8Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("6P8").Cells(int6P8Row, 37).Value = j 'Changed value in D column
           int6P8Row = int6P8Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select


       End If
 
 
       If wshSheet2.Range("W18").Value = "66" Then
           wshSheet2.Select
           wshSheet2.Range("Y17:AD17").Copy
           Sheets("6P9").Select
           Sheets("6P9").Cells(int6P9Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("6P9").Cells(int6P9Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y18:AD18").Copy
           Sheets("6P9").Select
           Sheets("6P9").Cells(int6P9Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("6P9").Cells(int6P9Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y19:AD19").Copy
           Sheets("6P9").Select
           Sheets("6P9").Cells(int6P9Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("6P9").Cells(int6P9Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y20:AD20").Copy
           Sheets("6P9").Select
           Sheets("6P9").Cells(int6P9Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("6P9").Cells(int6P9Row, 37).Value = j 'Changed value in D column
           int6P9Row = int6P9Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select


       End If
 
       If wshSheet2.Range("W25").Value = "66" Then
           wshSheet2.Select
           wshSheet2.Range("Y24:AD24").Copy
           Sheets("6P10").Select
           Sheets("6P10").Cells(int6P10Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("6P10").Cells(int6P10Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y25:AD25").Copy
           Sheets("6P10").Select
           Sheets("6P10").Cells(int6P10Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("6P10").Cells(int6P10Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y26:AD26").Copy
           Sheets("6P10").Select
           Sheets("6P10").Cells(int6P10Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("6P10").Cells(int6P10Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y27:AD27").Copy
           Sheets("6P10").Select
           Sheets("6P10").Cells(int6P10Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("6P10").Cells(int6P10Row, 37).Value = j 'Changed value in D column
           int6P10Row = int6P10Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select


       End If
 
       If wshSheet2.Range("W32").Value = "66" Then
           wshSheet2.Select
           wshSheet2.Range("Y31:AD31").Copy
           Sheets("6P11").Select
           Sheets("6P11").Cells(int6P11Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("6P11").Cells(int6P11Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y32:AD32").Copy
           Sheets("6P11").Select
           Sheets("6P11").Cells(int6P11Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("6P11").Cells(int6P11Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y33:AD33").Copy
           Sheets("6P11").Select
           Sheets("6P11").Cells(int6P11Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("6P11").Cells(int6P11Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y34:AD34").Copy
           Sheets("6P11").Select
           Sheets("6P11").Cells(int6P11Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("6P11").Cells(int6P11Row, 37).Value = j 'Changed value in D column
           int6P11Row = int6P11Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           

       End If
 
       If wshSheet2.Range("W39").Value = "66" Then
           wshSheet2.Select
           wshSheet2.Range("Y38:AD38").Copy
           Sheets("6P12").Select
           Sheets("6P12").Cells(int6P12Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("6P12").Cells(int6P12Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y39:AD39").Copy
           Sheets("6P12").Select
           Sheets("6P12").Cells(int6P12Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("6P12").Cells(int6P12Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y40:AD40").Copy
           Sheets("6P12").Select
           Sheets("6P12").Cells(int6P12Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("6P12").Cells(int6P12Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y41:AD41").Copy
           Sheets("6P12").Select
           Sheets("6P12").Cells(int6P12Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("6P12").Cells(int6P12Row, 37).Value = j 'Changed value in D column
           int6P12Row = int6P12Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
       End If
























   
       If wshSheet2.Range("N5").Value = "77" Then
           wshSheet2.Select
           wshSheet2.Range("P3:U3").Copy
           Sheets("7P1").Select
           Sheets("7P1").Cells(int7P1Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("7P1").Cells(int7P1Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("P4:U4").Copy
           Sheets("7P1").Select
           Sheets("7P1").Cells(int7P1Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("7P1").Cells(int7P1Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P5:U5").Copy
           Sheets("7P1").Select
           Sheets("7P1").Cells(int7P1Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("7P1").Cells(int7P1Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P6:U6").Copy
           Sheets("7P1").Select
           Sheets("7P1").Cells(int7P1Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("7P1").Cells(int7P1Row, 37).Value = j 'Changed value in D column
           int7P1Row = int7P1Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
       End If
   
       If wshSheet2.Range("N12").Value = "77" Then
           wshSheet2.Select
           wshSheet2.Range("P10:U10").Copy
           Sheets("7P2").Select
           Sheets("7P2").Cells(int7P2Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("7P2").Cells(int7P2Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P11:U11").Copy
           Sheets("7P2").Select
           Sheets("7P2").Cells(int7P2Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("7P2").Cells(int7P2Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P12:U12").Copy
           Sheets("7P2").Select
           Sheets("7P2").Cells(int7P2Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("7P2").Cells(int7P2Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P13:U13").Copy
           Sheets("7P2").Select
           Sheets("7P2").Cells(int7P2Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("7P2").Cells(int7P2Row, 37).Value = j 'Changed value in D column
           int7P2Row = int7P2Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
       End If
 
 
       If wshSheet2.Range("N19").Value = "77" Then
           wshSheet2.Select
           wshSheet2.Range("P17:U17").Copy
           Sheets("7P3").Select
           Sheets("7P3").Cells(int7P3Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("7P3").Cells(int7P3Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
          wshSheet2.Select
           wshSheet2.Range("P18:U18").Copy
           Sheets("7P3").Select
           Sheets("7P3").Cells(int7P3Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("7P3").Cells(int7P3Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
          wshSheet2.Select
           wshSheet2.Range("P19:U19").Copy
           Sheets("7P3").Select
           Sheets("7P3").Cells(int7P3Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("7P3").Cells(int7P3Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
          wshSheet2.Select
           wshSheet2.Range("P20:U20").Copy
           Sheets("7P3").Select
           Sheets("7P3").Cells(int7P3Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("7P3").Cells(int7P3Row, 37).Value = j 'Changed value in D column
           int7P3Row = int7P3Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
       End If
 
       If wshSheet2.Range("N26").Value = "77" Then
           wshSheet2.Select
           wshSheet2.Range("P24:U24").Copy
           Sheets("7P4").Select
           Sheets("7P4").Cells(int7P4Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("7P4").Cells(int7P4Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P25:U25").Copy
           Sheets("7P4").Select
           Sheets("7P4").Cells(int7P4Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("7P4").Cells(int7P4Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("P26:U26").Copy
           Sheets("7P4").Select
           Sheets("7P4").Cells(int7P4Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("7P4").Cells(int7P4Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("P27:U27").Copy
           Sheets("7P4").Select
           Sheets("7P4").Cells(int7P4Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("7P4").Cells(int7P4Row, 37).Value = j 'Changed value in D column
           int7P4Row = int7P4Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
       End If
 
       If wshSheet2.Range("N33").Value = "77" Then
           wshSheet2.Select
           wshSheet2.Range("P31:U31").Copy
           Sheets("7P5").Select
           Sheets("7P5").Cells(int7P5Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("7P5").Cells(int7P5Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("P32:U32").Copy
           Sheets("7P5").Select
           Sheets("7P5").Cells(int7P5Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("7P5").Cells(int7P5Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P33:U33").Copy
           Sheets("7P5").Select
           Sheets("7P5").Cells(int7P5Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("7P5").Cells(int7P5Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P34:U34").Copy
           Sheets("7P5").Select
           Sheets("7P5").Cells(int7P5Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("7P5").Cells(int7P5Row, 37).Value = j 'Changed value in D column
           int7P5Row = int7P5Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select


       End If
 
       If wshSheet2.Range("N40").Value = "77" Then
           wshSheet2.Select
           wshSheet2.Range("P38:U38").Copy
           Sheets("7P6").Select
           Sheets("7P6").Cells(int7P6Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("7P6").Cells(int7P6Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P39:U39").Copy
           Sheets("7P6").Select
           Sheets("7P6").Cells(int7P6Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("7P6").Cells(int7P6Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P40:U40").Copy
           Sheets("7P6").Select
           Sheets("7P6").Cells(int7P6Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("7P6").Cells(int7P6Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("P41:U41").Copy
           Sheets("7P6").Select
           Sheets("7P6").Cells(int7P6Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("7P6").Cells(int7P6Row, 37).Value = j 'Changed value in D column
           int7P6Row = int7P6Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select


       End If
       
       If wshSheet2.Range("W5").Value = "77" Then
           wshSheet2.Select
           wshSheet2.Range("Y3:AD3").Copy
           Sheets("7P7").Select
           Sheets("7P7").Cells(int7P7Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("7P7").Cells(int7P7Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y4:AD4").Copy
           Sheets("7P7").Select
           Sheets("7P7").Cells(int7P7Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("7P7").Cells(int7P7Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y5:AD5").Copy
           Sheets("7P7").Select
           Sheets("7P7").Cells(int7P7Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("7P7").Cells(int7P7Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y6:AD6").Copy
           Sheets("7P7").Select
           Sheets("7P7").Cells(int7P7Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("7P7").Cells(int7P7Row, 37).Value = j 'Changed value in D column
           int7P7Row = int7P7Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           

       End If
   
       If wshSheet2.Range("W12").Value = "77" Then
           wshSheet2.Select
           wshSheet2.Range("Y10:AD10").Copy
           Sheets("7P8").Select
           Sheets("7P8").Cells(int7P8Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("7P8").Cells(int7P8Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y11:AD11").Copy
           Sheets("7P8").Select
           Sheets("7P8").Cells(int7P8Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("7P8").Cells(int7P8Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y12:AD12").Copy
           Sheets("7P8").Select
           Sheets("7P8").Cells(int7P8Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("7P8").Cells(int7P8Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y13:AD13").Copy
           Sheets("7P8").Select
           Sheets("7P8").Cells(int7P8Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("7P8").Cells(int7P8Row, 37).Value = j 'Changed value in D column
           int7P8Row = int7P8Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select


       End If
 
 
       If wshSheet2.Range("W19").Value = "77" Then
           wshSheet2.Select
           wshSheet2.Range("Y17:AD17").Copy
           Sheets("7P9").Select
           Sheets("7P9").Cells(int7P9Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("7P9").Cells(int7P9Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y18:AD18").Copy
           Sheets("7P9").Select
           Sheets("7P9").Cells(int7P9Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("7P9").Cells(int7P9Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y19:AD19").Copy
           Sheets("7P9").Select
           Sheets("7P9").Cells(int7P9Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("7P9").Cells(int7P9Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y20:AD20").Copy
           Sheets("7P9").Select
           Sheets("7P9").Cells(int7P9Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("7P9").Cells(int7P9Row, 37).Value = j 'Changed value in D column
           int7P9Row = int7P9Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select


       End If
 
       If wshSheet2.Range("W26").Value = "77" Then
           wshSheet2.Select
           wshSheet2.Range("Y24:AD24").Copy
           Sheets("7P10").Select
           Sheets("7P10").Cells(int7P10Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("7P10").Cells(int7P10Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y25:AD25").Copy
           Sheets("7P10").Select
           Sheets("7P10").Cells(int7P10Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("7P10").Cells(int7P10Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y26:AD26").Copy
           Sheets("7P10").Select
           Sheets("7P10").Cells(int7P10Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("7P10").Cells(int7P10Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y27:AD27").Copy
           Sheets("7P10").Select
           Sheets("7P10").Cells(int7P10Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("7P10").Cells(int7P10Row, 37).Value = j 'Changed value in D column
           int7P10Row = int7P10Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select


       End If
 
       If wshSheet2.Range("W33").Value = "77" Then
           wshSheet2.Select
           wshSheet2.Range("Y31:AD31").Copy
           Sheets("7P11").Select
           Sheets("7P11").Cells(int7P11Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("7P11").Cells(int7P11Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y32:AD32").Copy
           Sheets("7P11").Select
           Sheets("7P11").Cells(int7P11Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("7P11").Cells(int7P11Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y33:AD33").Copy
           Sheets("7P11").Select
           Sheets("7P11").Cells(int7P11Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("7P11").Cells(int7P11Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y34:AD34").Copy
           Sheets("7P11").Select
           Sheets("7P11").Cells(int7P11Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("7P11").Cells(int7P11Row, 37).Value = j 'Changed value in D column
           int7P11Row = int7P11Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           

       End If
 
       If wshSheet2.Range("W40").Value = "77" Then
           wshSheet2.Select
           wshSheet2.Range("Y38:AD38").Copy
           Sheets("7P12").Select
           Sheets("7P12").Cells(int7P12Row, 1).PasteSpecial Paste:=xlPasteValues
           Sheets("7P12").Cells(int7P12Row, 7).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select

           wshSheet2.Select
           wshSheet2.Range("Y39:AD39").Copy
           Sheets("7P12").Select
           Sheets("7P12").Cells(int7P12Row, 11).PasteSpecial Paste:=xlPasteValues
           Sheets("7P12").Cells(int7P12Row, 17).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y40:AD40").Copy
           Sheets("7P12").Select
           Sheets("7P12").Cells(int7P12Row, 21).PasteSpecial Paste:=xlPasteValues
           Sheets("7P12").Cells(int7P12Row, 27).Value = j 'Changed value in D column
           Application.CutCopyMode = False
           Sheets("Sheet2").Select
           
           wshSheet2.Select
           wshSheet2.Range("Y41:AD41").Copy
           Sheets("7P12").Select
           Sheets("7P12").Cells(int7P12Row, 31).PasteSpecial Paste:=xlPasteValues
           Sheets("7P12").Cells(int7P12Row, 37).Value = j 'Changed value in D column
           int7P12Row = int7P12Row + 1
           Application.CutCopyMode = False
           Sheets("Sheet2").Select


       End If



































   Next i
   
End Sub
just make the variables global

outside of the functions declare the variables as

public i as long
ykes... it is large indeed. But I can see some repetitions on it. I'll take a closer look into it and get back to you in a while (better wait sitting :))
ASKER CERTIFIED SOLUTION
Avatar of pauloaguia
pauloaguia
Flag of Portugal image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
greeat, thanx for the help
Glad to help. Thanks for the points. By the way, next time you may consider giving more points for a task of this magnitude.

Paulo