Hi could someone help me add the follwing to this code ?
So that if column TL has an 'x' it would copy range.
if LCase(.Range("Tl81").Value) = "x" Then
.Range("TL81:Tx81").Copy Sheets("COPY").Range("NU" & Rows.Count).End(xlUp).Offset(1)
if LCase(.Range("Tl82").Value) = "x" Then
.Range("TL82:Tx82").Copy Sheets("COPY").Range("NU" & Rows.Count).End(xlUp).Offset(1)
So that if column TL has an 'x' it would copy range.
if LCase(.Range("Tl81").Value) = "x" Then
.Range("TL81:Tx81").Copy Sheets("COPY").Range("NU" & Rows.Count).End(xlUp).Offset(1)
if LCase(.Range("Tl82").Value) = "x" Then
.Range("TL82:Tx82").Copy Sheets("COPY").Range("NU" & Rows.Count).End(xlUp).Offset(1)
VBA Code:
Sub copy()
Dim i As Long
For i = 1 To 60
With Sheets(CStr(i))
If LCase(.Range("TL80").Value) = "x" Then
.Range("TL80:Tx80").Copy Sheets("COPY").Range("NU" & Rows.Count).End(xlUp).Offset(1)
End If
End With
Next i
End Sub