Reputation: 45
Could someone help me tweak this slightly so it copies and pastes just the values to the cells and not the formulas?
Set copyRange = wsInfoFrom.Range("A1:A" & lastrow)
copyRange.SpecialCells(xlCellTypeVisible).Copy wsInfoTo.Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
Worksheets("View").Activate
Regards, Mils
Upvotes: 2
Views: 3412
Reputation: 128
Fist you select the source range Then you select the target range Set copy to sc and pastespecial to target range and there you go :D
Set copyRange = ActiveSheet.Range("A1:A" & lastrow)
copyRange.SpecialCells(xlCellTypeVisible).Copy
ActiveSheet.Range("A" & Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
Worksheets("View").Activate
Upvotes: 1
Reputation: 94
Something like this should work
Sheets("Sheet1").Columns(1).Copy
Sheets("Sheet2").Columns(2).PasteSpecial xlPasteValues
Don't have excel available to me at the moment but I believe you'd use PasteSpecial like this in your example:
wsInfoTo.Range("A" & Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
Upvotes: 3