I am trying to replace “EntireRow.Copy” to only copy the range of columns F:AB.
Currently my code:
Copies the whole row. How can I have it select only the desired range?
I do this with a delete function I have:
sht.Range(col1 & “:” & col2).delete
You could modify it to do this:
You’d obviously need to swap out A1:C1 with variables based on some criteria. But that will set a range of cells equal to another range
xRg is a range (please post more code)
Range(Cells(xRg(K).Row, "F"), Cells(xRg(K).Row, "AB")).Copy
Using the below you copy from row 1 to row 10 of columns F:AB
Option Explicit Sub test() With ThisWorkbook.Worksheets("Sheet1") .Range(.Cells(1, "F"), .Cells(10, "AB")).Copy End With End Sub