Hi everyone! Am new here and would appreciate some help.
I have 2 sheets (Sheet 1 & Sheet 2) and would like to populate a portion of Sheet 2 with just 6 columns from a whole bunch of data I am updating manually everyday in Sheet 1 with a click of a button. However, there are some information that I would like to edit in the populated section of sheet 2 and would not want it to be updated every time I click it.
The only data that is constant that would not need changing is Column 'V' in Sheet 2. So I have tried various methods of using 'For - Each' cell in column V in Sheet 2 comparing to the its original entire range in column E in Sheet 1. If it matches, then do not initiate this copy and paste macro for that row. So far I have been unsuccessful as I am unable to reference Sheet 2 in every For - Each code I tried.
This is the only thing that works currently. The pasting starts from row 2 as the first row is a header.
Thank you!
I have 2 sheets (Sheet 1 & Sheet 2) and would like to populate a portion of Sheet 2 with just 6 columns from a whole bunch of data I am updating manually everyday in Sheet 1 with a click of a button. However, there are some information that I would like to edit in the populated section of sheet 2 and would not want it to be updated every time I click it.
The only data that is constant that would not need changing is Column 'V' in Sheet 2. So I have tried various methods of using 'For - Each' cell in column V in Sheet 2 comparing to the its original entire range in column E in Sheet 1. If it matches, then do not initiate this copy and paste macro for that row. So far I have been unsuccessful as I am unable to reference Sheet 2 in every For - Each code I tried.
This is the only thing that works currently. The pasting starts from row 2 as the first row is a header.
With Sheet1
' 1st Column in Sheet (Date)
.Range("C5", .Cells(Rows.Count, "C").End(xlUp)).Copy Sheet2.Range("U2")
' 2nd Column in Sheet 2
.Range("E5", .Cells(Rows.Count, "E").End(xlUp)).Copy Sheet2.Range("V2")
' 3rd Column in Sheet 2
.Range("AF5", .Cells(Rows.Count, "AF").End(xlUp)).Copy Sheet2.Range("W2")
' 4th Column in Sheet 2
.Range("AG5", .Cells(Rows.Count, "AG").End(xlUp)).Copy Sheet2.Range("X2")
' 5th Number Column in Sheet 2
.Range("AH5", .Cells(Rows.Count, "AH").End(xlUp)).Copy Sheet2.Range("Y2")
' 6th Column in Sheet 2
.Range("AU5", .Cells(Rows.Count, "AU").End(xlUp)).Copy Sheet2.Range("Z2")
' Data in Sheet 2 without format
Sheet2.Range("U2:Z1000").ClearFormats
Sheet2.Range("U2:U1000").NumberFormat = "mm/dd/yyyy"
Sheet2.Range("U2:Z1000").Borders.LineStyle = xlNone
Sheet2.Range("U2:Z1000").HorizontalAlignment = xlCenter
End With
Thank you!