#REF! error during copy and paste

  • Thread starter Thread starter laneman
  • Start date Start date
L

laneman

I assigned a vlookup function to a data input sheet. The plan is that
after the data is entered, the user can run a macro that copies and
pastes the data from each cell of the input sheet to a different sheet
in the same workbook. When I try to copy the number that the vlookup
formula returned, Excel pastes a #REF! error into the second sheet.
 
lane

After Copy use Paste Special>Values.

Code would look like this.....

Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False

Gord Dibben Excel MVP
 
Back
Top