Hi all,
I am having an issue with my macro. I have a button set up to copy data from one sheet and then paste it on another. A formula in one of the cells is pasting and changes when it gets paste, thus throwing a Ref error. I want to keep both the formatting and the value, so "Paste:=xlPasteValues" will not work in this case. Any other way of getting this to work?
I am having an issue with my macro. I have a button set up to copy data from one sheet and then paste it on another. A formula in one of the cells is pasting and changes when it gets paste, thus throwing a Ref error. I want to keep both the formatting and the value, so "Paste:=xlPasteValues" will not work in this case. Any other way of getting this to work?
Code:
Sheets("Sheet1").Range("A19:D158").SpecialCells(xlCellTypeVisible).Copy Sheets("Sheet2").Activate
lastrow = Range("A65536").End(xlUp).Row
Cells(lastrow + 1, 1).PasteSpecial Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Last edited: