Hi,
I have the following code for copying and pasting an entire row from one spreadsheet into another:
Sub ExportRow72()
'Declare Variables
Dim MyRange As Range, rng As Worksheet
Set rng = Workbooks("2012 to 2016 bound new test VBA").Sheets("2015 CLASH")
Set MyRange = Workbooks("Copy of Mkt Curve Tool Working Copy SW v3").Sheets("Summary In 2").Rows(72)
MyRange.Copy
rng.Range("a" & Rows.Count).End(xlUp).Offset(1).PasteSpecial xlPasteValues
End Sub
But instead of pasting into the last row, I want to lookup/match the value in column A and paste over that row (the rows are the exact same values so each cell will match one for one) - any idea how to do that? Also, my row has cells that are both numbers and formulae, any idea which member of xlPasteType class I should use?
Thanks!
Daniel
I have the following code for copying and pasting an entire row from one spreadsheet into another:
Sub ExportRow72()
'Declare Variables
Dim MyRange As Range, rng As Worksheet
Set rng = Workbooks("2012 to 2016 bound new test VBA").Sheets("2015 CLASH")
Set MyRange = Workbooks("Copy of Mkt Curve Tool Working Copy SW v3").Sheets("Summary In 2").Rows(72)
MyRange.Copy
rng.Range("a" & Rows.Count).End(xlUp).Offset(1).PasteSpecial xlPasteValues
End Sub
But instead of pasting into the last row, I want to lookup/match the value in column A and paste over that row (the rows are the exact same values so each cell will match one for one) - any idea how to do that? Also, my row has cells that are both numbers and formulae, any idea which member of xlPasteType class I should use?
Thanks!
Daniel