Below is an example - you just have to set the variables ahead of time - if you want to also change workbook just specify that ahead of the worksheet name(s)
Code:
SourceRangeVal = Split(Cells(1, ColumnFirst).Address, "$")(1) & FirstRecord & ":" & Split(Cells(1, ColumnLast).Address, "$")(1) & LastRecord
DistinationRangeVal = Split(Cells(1, ColumnFirst).Address, "$")(1) & FirstRecord & ":" & Split(Cells(1, ColumnLast).Address, "$")(1) & LastRecord
Worksheets("Sheet1").Range(SourceRangeVal).Copy Destination:=Worksheets("Sheet2").Range(DistinationRangeVal)
If by selected values you mean cells highlighted (by the mosue) in your sheet then use the selection property - I am not sure exactly what you mean
Bookmarks