#REF! error during copy and paste

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.
 
G

Gord Dibben

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top