Hi!
I have some logic which will copy and paste into a range using last row. that works fine:
I then want to re-copy that and paste it below the paste values above. this also works fine:
The issue I have is, then I want to replace cells on the 2nd data set I pasted, and that doesnt seem to be working properly. it only replaces the 1st line of that range, and not the ones beneath it:
Any ideas?
I have some logic which will copy and paste into a range using last row. that works fine:
VBA Code:
lastrow = ActiveSheet.Range("AY7:BB" & Rows.Count).Find("").Row - 1
Set CopyRng = Range("AY7:BB" & lastrow)
CopyRng.Copy
Range("AQ7:AT" & lastrow).PasteSpecial xlPasteValues
I then want to re-copy that and paste it below the paste values above. this also works fine:
VBA Code:
'last row of actual data
lastrowadj = ActiveSheet.Range("AQ7:AT" & Rows.Count).Find("").Row
'copy original range/paste orignal range below 1st paste
CopyRng.Copy
Range("AQ" & lastrowadj & ":AT" & lastrowadj).PasteSpecial xlPasteValues
The issue I have is, then I want to replace cells on the 2nd data set I pasted, and that doesnt seem to be working properly. it only replaces the 1st line of that range, and not the ones beneath it:
VBA Code:
'final last row data
lastrowfinal = ActiveSheet.Range("AQ7:AT" & Rows.Count).Find("").Row
range("AQ" & lastrowadj & ":AQ" & lastrowfinal).Replace What:="S", Replacement:="Sam", LookAt:=xlWhole
Range("AQ" & lastrowadj & ":AQ" & lastrowfinal).Replace What:="B", Replacement:="Boy", LookAt:=xlWhole
Any ideas?