As I'm not shure what macro you use I'll just modify both.
Sub CopyDiff()
Dim cell As Range
ActiveSheet.UsedRange.Copy
With ActiveSheet.UsedRange
.Offset(0, 2).PasteSpecial Paste:=xlPasteAll
End With
Application.CutCopyMode = False
For Each cell In Range("C2:C" & Range("C" & Rows.Count).End(xlUp).Row)
cell.Value = 0.315 - cell.Value
Next cell
End Sub
and the second macro will look like this
Sub CopyData()
Dim cell As Range
Range("A1:A" & Range("A" & Rows.Count).End(xlUp).Row).Copy
Range("C1").PasteSpecial Paste:=xlAll
Range("B1:B" & Range("B" & Rows.Count).End(xlUp).Row).Copy
Range("D1").PasteSpecial Paste:=xlPasteAll
Application.CutCopyMode = False
For Each cell In Range("C2:C" & Range("C" & Rows.Count).End(xlUp).Row)
cell.Value = 0.315 - cell.Value
Next cell
End Sub
What I'm a bit unsure about is that originaly you spoke about copying range A:B to C:D and now you are talking about range E2:E40 and G2:G40? Am I missing something?
There is no problem exstending the copy to range if you need to.
I've also set the range "C2:C" to be dynamic so macro will find the last value in the C column be it C30 or C150.
Alf
Bookmarks