Sub main()
Dim iLastRow As Long, iLastRowData As Long, iLastRow1 As Long, iLastRow2 As Long, iLastRow3 As Long, iLastRowFr As Long
iLastRow = Worksheets("log_book").Cells(3, 1).End(xlDown).Row
iLastRowData = Worksheets("Data").Cells(6, 1).End(xlDown).Row
iLastRow1 = iLastRow + iLastRow
iLastRow2 = iLastRow1 + iLastRow
iLastRow3 = iLastRow2 + iLastRow
iLastRowFr = iLastRow3 + iLastRow
'surface_preparation
'date+time
Worksheets("data").Select
Range(Cells(6, 11), Cells(iLastRowData, 11)).Copy
Worksheets("log_book").Select
Cells(iLastRow + 1, 1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.NumberFormat = "dd/mm/yy h:mm;@"
'name
Worksheets("data").Select
Range(Cells(6, 138), Cells(iLastRowData, 138)).Copy
Worksheets("log_book").Select
Cells(iLastRow + 1, 2).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'Ts
Worksheets("data").Select
Range(Cells(6, 12), Cells(iLastRowData, 12)).Copy
Worksheets("log_book").Select
Cells(iLastRow + 1, 4).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'Ta
Worksheets("data").Select
Range(Cells(6, 13), Cells(iLastRowData, 13)).Copy
Worksheets("log_book").Select
Cells(iLastRow + 1, 5).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'grit_part
Worksheets("data").Select
Range(Cells(6, 8), Cells(iLastRowData, 8)).Copy
Worksheets("log_book").Select
Cells(iLastRow + 1, 7).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'Input_control
Worksheets("data").Select
Range(Cells(6, 127), Cells(iLastRowData, 127)).Copy
Worksheets("log_book").Select
Cells(iLastRow + 1, 8).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'date_sign+#
Worksheets("data").Select
Range(Cells(6, 148), Cells(iLastRowData, 148)).Copy
Worksheets("log_book").Select
Cells(iLastRow + 1, 12).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'layer1
'date+time
Worksheets("data").Select
Range(Cells(6, 22), Cells(iLastRowData, 22)).Copy
Worksheets("log_book").Select
Cells(iLastRow1 + 1, 1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.NumberFormat = "dd/mm/yy h:mm;@"
'name
Worksheets("data").Select
Range(Cells(6, 139), Cells(iLastRowData, 139)).Copy
Worksheets("log_book").Select
Cells(iLastRow1 + 1, 2).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'Ts
Worksheets("data").Select
Range(Cells(6, 23), Cells(iLastRowData, 23)).Copy
Worksheets("log_book").Select
Cells(iLastRow1 + 1, 4).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'Ta
Worksheets("data").Select
Range(Cells(6, 24), Cells(iLastRowData, 24)).Copy
Worksheets("log_book").Select
Cells(iLastRow1 + 1, 5).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'paint_part
Worksheets("data").Select
Range(Cells(6, 142), Cells(iLastRowData, 142)).Copy
Worksheets("log_book").Select
Cells(iLastRow1 + 1, 7).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'Input_control
Worksheets("data").Select
Range(Cells(6, 145), Cells(iLastRowData, 145)).Copy
Worksheets("log_book").Select
Cells(iLastRow1 + 1, 8).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'date_sign+#
Worksheets("data").Select
Range(Cells(6, 148), Cells(iLastRowData, 148)).Copy
Worksheets("log_book").Select
Cells(iLastRow1 + 1, 12).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'layer2
'date+time
Worksheets("data").Select
Range(Cells(6, 33), Cells(iLastRowData, 33)).Copy
Worksheets("log_book").Select
Cells(iLastRow2 + 1, 1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.NumberFormat = "dd/mm/yy h:mm;@"
'name
Worksheets("data").Select
Range(Cells(6, 140), Cells(iLastRowData, 140)).Copy
Worksheets("log_book").Select
Cells(iLastRow2 + 1, 2).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'Ts
Worksheets("data").Select
Range(Cells(6, 34), Cells(iLastRowData, 34)).Copy
Worksheets("log_book").Select
Cells(iLastRow2 + 1, 4).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'Ta
Worksheets("data").Select
Range(Cells(6, 35), Cells(iLastRowData, 35)).Copy
Worksheets("log_book").Select
Cells(iLastRow2 + 1, 5).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'paint_part
Worksheets("data").Select
Range(Cells(6, 143), Cells(iLastRowData, 143)).Copy
Worksheets("log_book").Select
Cells(iLastRow2 + 1, 7).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'Input_control
Worksheets("data").Select
Range(Cells(6, 146), Cells(iLastRowData, 146)).Copy
Worksheets("log_book").Select
Cells(iLastRow2 + 1, 8).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'date_sign+#
Worksheets("data").Select
Range(Cells(6, 148), Cells(iLastRowData, 148)).Copy
Worksheets("log_book").Select
Cells(iLastRow2 + 1, 12).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'layer3
'date+time
Worksheets("data").Select
Range(Cells(6, 44), Cells(iLastRowData, 44)).Copy
Worksheets("log_book").Select
Cells(iLastRow3 + 1, 1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.NumberFormat = "dd/mm/yy h:mm;@"
'name
Worksheets("data").Select
Range(Cells(6, 141), Cells(iLastRowData, 141)).Copy
Worksheets("log_book").Select
Cells(iLastRow3 + 1, 2).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'Ts
Worksheets("data").Select
Range(Cells(6, 45), Cells(iLastRowData, 45)).Copy
Worksheets("log_book").Select
Cells(iLastRow3 + 1, 4).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'Ta
Worksheets("data").Select
Range(Cells(6, 46), Cells(iLastRowData, 46)).Copy
Worksheets("log_book").Select
Cells(iLastRow3 + 1, 5).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'paint_part
Worksheets("data").Select
Range(Cells(6, 144), Cells(iLastRowData, 144)).Copy
Worksheets("log_book").Select
Cells(iLastRow3 + 1, 7).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'Input_control
Worksheets("data").Select
Range(Cells(6, 147), Cells(iLastRowData, 147)).Copy
Worksheets("log_book").Select
Cells(iLastRow3 + 1, 8).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'date_sign+#
Worksheets("data").Select
Range(Cells(6, 148), Cells(iLastRowData, 148)).Copy
Worksheets("log_book").Select
Cells(iLastRow3 + 1, 12).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'frame
Worksheets("log_book").Select
Range(Cells(iLastRowFr, 1), Cells(4, 13)).Select
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
Sheets("log_book").Select
Range("A1").Select
End Sub
|