Hello.Use the following code to copy several separate columns from several sheets to one sheet.my problem is that it copies formats and colors how can I copy only values
VBA Code:
Sub Sheets_Arrays2()
Dim LR&, LR2&
Dim wsData As Variant
Dim Dest As Worksheet: Set Dest = Sheets("main")
For Each wsData In Sheets(Array("op2023", "mt10", "zt15"))
LR = wsData.Cells(Rows.Count, "E").End(xlUp).Row
LR2 = Dest.Cells(Rows.Count, "C").End(xlUp).Row
Application.ScreenUpdating = False
wsData.Range("E10:F" & LR).Copy Destination:=Dest.Range("C" & LR2 + 1)
wsData.Range("H10:H" & LR).Copy Destination:=Dest.Range("E" & LR2 + 1)
wsData.Range("J10:J" & LR).Copy Destination:=Dest.Range("F" & LR2 + 1)
wsData.Range("L10:M" & LR).Copy Destination:=Dest.Range("G" & LR2 + 1)
wsData.Range("P10:Q" & LR).Copy Destination:=Dest.Range("I" & LR2 + 1)
Application.ScreenUpdating = True
Next wsData
End Sub